Class RealmAuthenticationAdapter

java.lang.Object
com.sun.xml.wss.RealmAuthenticationAdapter
Direct Known Subclasses:
DefaultRealmAuthenticationAdapter

public abstract class RealmAuthenticationAdapter extends Object
This abstract class defines an SPI that Metro Application developers can implement, to handle custom username/password and username/Password-Digest authentication. The SPI implementation class needs to specified as a META-INF/services entry with name "com.sun.xml.xwss.RealmAuthenticator". A default implementation of this SPI is returned if no entry is configured.
  • Field Details

  • Constructor Details

    • RealmAuthenticationAdapter

      protected RealmAuthenticationAdapter()
      Creates a new instance of RealmAuthenticator
  • Method Details

    • authenticate

      public abstract boolean authenticate(Subject callerSubject, String username, String password) throws XWSSecurityException
      Parameters:
      callerSubject - the callerSubject should contain the appropriate principal's of the caller after a successful authentication
      username - the username
      password - the password
      Returns:
      true if authentication succeeds
      Throws:
      XWSSecurityException - if there is an authentication failure
    • authenticate

      public boolean authenticate(Subject callerSubject, String username, String password, Map runtimeProps) throws XWSSecurityException
      Parameters:
      callerSubject - the callerSubject should contain the appropriate principal's of the caller after a successful authentication
      username - the username
      password - the password
      runtimeProps - Map of runtime properties that can be used in authentication decision
      Returns:
      true if authentication succeeds
      Throws:
      XWSSecurityException - if there is an authentication failure
    • authenticate

      public boolean authenticate(Subject callerSubject, String username, String passwordDigest, String nonce, String created) throws XWSSecurityException
      Parameters:
      callerSubject - the callerSubject should contain the appropriate principal's of the caller after a successful authentication
      username - the username
      passwordDigest - the password-digest
      nonce - a nonce sent by the caller in the UsernameToken
      created - the creation time of the UsernameToken
      Returns:
      true if authentication succeeds
      Throws:
      XWSSecurityException - if there is an authentication failure
    • authenticate

      public boolean authenticate(Subject callerSubject, String username, String passwordDigest, String nonce, String created, Map runtimeProps) throws XWSSecurityException
      Parameters:
      callerSubject - the callerSubject should contain the appropriate principal's of the caller after a successful authentication
      username - the username
      passwordDigest - the password-digest
      nonce - a nonce sent by the caller in the UsernameToken
      created - the creation time of the UsernameToken
      runtimeProps - Map of runtime properties that can be used in authentication decision
      Returns:
      true if authentication succeeds
      Throws:
      XWSSecurityException - if there is an authentication failure
    • newInstance

      public static RealmAuthenticationAdapter newInstance(Object context)
      Parameters:
      context - optional context that can be used to locate the META-INF/services entry "com.sun.xml.xwss.RealmAuthenticator"
      Returns:
      a new instance of the RealmAuthenticationAdapter