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
|
Subject |
getSubject()
Gets the client request subject.
|
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(PrivilegedAction<T> action)
Runs the specified action using the client request subject.
|
<T> T |
runAsSubject(PrivilegedExceptionAction<T> action)
Runs the specified action using the client request subject.
|
<T> T |
runAsSubject(Ref serviceAccount, 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/passwordIllegalArgumentException - if serviceAccount is nullSubject 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 subjectIllegalArgumentException - if serviceAccount is nullSubject 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(PrivilegedAction<T> action) throws CredentialNotFoundException
action - the action to run using the client request subjectPrivilegedActionException - exception thrown from specified actionCredentialNotFoundException - if there is any error while resolving the subject<T> T runAsSubject(PrivilegedExceptionAction<T> action) throws PrivilegedActionException, CredentialNotFoundException
action - the action to run using the client request subjectPrivilegedActionException - exception thrown from specified actionCredentialNotFoundException - if there is any error while resolving the subject<T> T runAsSubject(Ref serviceAccount, PrivilegedExceptionAction<T> action) throws PrivilegedActionException, CredentialNotFoundException
serviceAccount - a reference to the endpoint's service accountaction - the action to run using the client request subjectPrivilegedActionException - 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()