com.bea.wli.sb.transports
Interface CredentialCallback


public interface CredentialCallback

Transport providers get an instance of this callback interface from ALSB. The transport provider can call its methods to fetch a credential used for outbound authentication.


Method Summary
 weblogic.security.KeyPairCredential getKeyPair()
          Returns a key-pair credential used for outbound SSL client authentication.
 Subject getSubject()
          Gets the client request subject.
 UsernamePassword getUsernamePassword(Ref serviceAccount)
          Gets the username/password according to the service account policy.
 weblogic.security.UsernameAndPassword getUsernamePasswordCredential(Ref serviceAccount)
          Deprecated. Use getUsernamePassword(com.bea.wli.config.Ref) instead
 

Method Detail

getUsernamePassword

UsernamePassword getUsernamePassword(Ref serviceAccount)
                                     throws CredentialNotFoundException
Gets the username/password according to the service account policy. The transport provider can use this username/password for outbound basic authentication.

Parameters:
serviceAccount - a reference to the endpoint’s service account
Returns:
the username/password
Throws:
CredentialNotFoundException - if there is any error while resolving the username/password
IllegalArgumentException - if serviceAccount is null

getUsernamePasswordCredential

weblogic.security.UsernameAndPassword getUsernamePasswordCredential(Ref serviceAccount)
                                                                    throws CredentialNotFoundException
Deprecated. Use getUsernamePassword(com.bea.wli.config.Ref) instead

Gets the username/password according to the service account policy. The transport provider can use this username/password for outbound basic authentication.

Parameters:
serviceAccount - a reference to the endpoint’s service account
Returns:
the username/password
Throws:
CredentialNotFoundException - if there is any error while resolving the username/password
IllegalArgumentException - if serviceAccount is null

getSubject

Subject getSubject()
                   throws CredentialNotFoundException
Gets the client request subject. ALSB supports several mechanisms to authenticate clients. In particular, the client request may be authenticated at the transport level or message level. Transport providers must not make any assumptions about the method used to authenticate this subject. Note that this subject may be anonymous.

The transport provider can use this subject for JAAS-based outbound authentication. The transport provider can call Security.runAs(javax.security.auth.Subject, java.security.PrivilegedAction) 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.

Returns:
the client subject
Throws:
CredentialNotFoundException - if there is any error while resolving the subject

getKeyPair

weblogic.security.KeyPairCredential getKeyPair()
                                               throws CredentialNotFoundException
Returns a key-pair credential used for outbound SSL client authentication.

Returns:
the SSL key-pair
Throws:
CredentialNotFoundException - if there is any error while resolving the key-pair