public interface CredentialCallback
| Modifier and Type | Method and Description | 
|---|---|
| KeyPairCredential | getKeyPair()Returns a key-pair credential used for outbound SSL client authentication. | 
| Ref | getServiceKeyProvider()Returns a reference to the service key provider used by this CredentialCallback or null if the CredentialCallback does not have a service key provider | 
| javax.security.auth.Subject | getSubject()Gets the client request subject. | 
| javax.security.auth.Subject | getSubject(Ref serviceAccount)Gets the JAAS subject according to the service account policy. | 
| UsernamePassword | getUsernamePassword(Ref serviceAccount)Gets the username/password according to the service account policy. | 
| <T> T | runAsSubject(java.security.PrivilegedAction<T> action)Runs the specified action using the client request subject. | 
| <T> T | runAsSubject(java.security.PrivilegedExceptionAction<T> action)Runs the specified action using the client request subject. | 
| <T> T | runAsSubject(Ref serviceAccount, java.security.PrivilegedExceptionAction<T> action)Runs the specified action using the subject according to the service account policy. | 
UsernamePassword getUsernamePassword(Ref serviceAccount) throws CredentialNotFoundException
serviceAccount - a reference to the endpoint's service accountCredentialNotFoundException - if there is any error while resolving the username/passwordjava.lang.IllegalArgumentException - if serviceAccount is nulljavax.security.auth.Subject getSubject(Ref serviceAccount) throws CredentialNotFoundException
oracle.security.jps.runtime.SubjectSecurity#executeAs(javax.security.auth.Subject,java.security.PrivilegedAction) to push the subject on the thread.serviceAccount - a reference to the endpoint's service accountCredentialNotFoundException - if there is any error while resolving the subjectjava.lang.IllegalArgumentException - if serviceAccount is null
javax.security.auth.Subject getSubject()
                                       throws CredentialNotFoundException
The transport provider can use this subject for JAAS-based outbound authentication. The transport provider can call to push the subject on the thread.
Note: transport providers should not rely on the subject on the thread at the time the provider is invoked.
CredentialNotFoundException - if there is any error while resolving the subject
<T> T runAsSubject(java.security.PrivilegedAction<T> action)
               throws CredentialNotFoundException
action - the action to run using the client request subjectjava.security.PrivilegedActionException - exception thrown from specified actionCredentialNotFoundException - if there is any error while resolving the subject
<T> T runAsSubject(java.security.PrivilegedExceptionAction<T> action)
               throws java.security.PrivilegedActionException,
                      CredentialNotFoundException
action - the action to run using the client request subjectjava.security.PrivilegedActionException - exception thrown from specified actionCredentialNotFoundException - if there is any error while resolving the subject<T> T runAsSubject(Ref serviceAccount, java.security.PrivilegedExceptionAction<T> action) throws java.security.PrivilegedActionException, CredentialNotFoundException
serviceAccount - a reference to the endpoint's service accountaction - the action to run using the client request subjectjava.security.PrivilegedActionException - exception thrown from specified actionCredentialNotFoundException - if there is any error while resolving the subject
KeyPairCredential getKeyPair()
                             throws CredentialNotFoundException
CredentialNotFoundException - if there is any error while resolving the key-pairRef getServiceKeyProvider()