Class AuthCredentials

java.lang.Object
com.webmethods.caf.wsclient.AuthCredentials
All Implemented Interfaces:
Serializable, Cloneable

public class AuthCredentials extends Object implements Cloneable, Serializable
Authentication information describing the user that is invoking the webservice. This can leverage either basic auth, SAML auth or be anonymous
See Also:
  • Field Details

    • PROP_SAML_USE_BASIC

      public static final String PROP_SAML_USE_BASIC
      See Also:
    • PROP_BASIC_DEFAULT_PASSWORD

      public static final String PROP_BASIC_DEFAULT_PASSWORD
      See Also:
    • BASIC_AUTH_DEFAULT_PASSWORD

      public static String BASIC_AUTH_DEFAULT_PASSWORD
    • METHOD_NONE

      public static final int METHOD_NONE
      See Also:
    • METHOD_BASIC

      public static final int METHOD_BASIC
      See Also:
    • METHOD_SAML

      public static final int METHOD_SAML
      See Also:
    • METHOD_HYBRID

      public static final int METHOD_HYBRID
      See Also:
    • METHOD_NONCE

      public static final int METHOD_NONCE
      See Also:
    • EMPTY_AUTH

      public static final AuthCredentials EMPTY_AUTH
      If you're webservice doesn't require auth, you should use this static AuthCredentials
    • SAML_AUTH

      public static final AuthCredentials SAML_AUTH
      AuthCredentials to force SAML authentication
    • SAML_HYBRID_AUTH

      public static final AuthCredentials SAML_HYBRID_AUTH
      AuthCredentials to force a Basic/SAML hybrid authentication. Basic authenication is used with a username of "SAMLart" and a password containing a SAML authentication token. Currently, Integration Server is the only web service provider that honors this authentication method
    • NONCE_AUTH

      public static final AuthCredentials NONCE_AUTH
      Deprecated.
      AuthCredentials that use a Nonce factory for authenication
    • m_userName

      protected String m_userName
      Username for SAML/basic hybrid authentication
    • m_password

      protected String m_password
    • m_authMethod

      protected int m_authMethod
    • s_isMwsRuntime

      protected static Boolean s_isMwsRuntime
  • Constructor Details

    • AuthCredentials

      public AuthCredentials(AuthCredentials authCredentials)
    • AuthCredentials

      public AuthCredentials(String userName, String password)
    • AuthCredentials

      public AuthCredentials(String userName, String password, boolean requiresAuth)
      Deprecated.
      requiresAuth is no longer a valid parameter, use username/pass version of constructor
      Parameters:
      userName -
      password -
    • AuthCredentials

      public AuthCredentials(int authenticationMethod)
      Parameters:
      authenticationMethod - constant int code specifying the authentication method
  • Method Details

    • getUserName

      public String getUserName()
    • setUserName

      public void setUserName(String newVal)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String newVal)
    • getRequiresAuth

      public boolean getRequiresAuth()
    • setRequiresAuth

      public void setRequiresAuth(boolean newVal)
    • getUseSAML

      public boolean getUseSAML()
    • getUseNonce

      public boolean getUseNonce()
    • setUseNonce

      public void setUseNonce()
    • getAllowNullPasswords

      public boolean getAllowNullPasswords()
    • setAllowNullPasswords

      public void setAllowNullPasswords(boolean newVal)
    • getAuthenticationMethod

      public int getAuthenticationMethod()
    • setAuthenticationMethod

      public void setAuthenticationMethod(int newVal)
    • getArtifact

      public String getArtifact()
      See Also:
    • getID

      public String getID()
      This is used by the IWSClientSessionManager instance in order to build up a unique Key for different sessions
      Returns:
      The unique auth credentials key as a String
    • equals

      public boolean equals(Object thatObj)
      Overrides:
      equals in class Object
    • getArtifactFactory

      protected IArtifactFactory getArtifactFactory()
    • getClientConfig

      protected WSClientConfig getClientConfig()
    • clone

      public AuthCredentials clone()
      Overrides:
      clone in class Object
    • getCurrentUserFromMWS

      protected String getCurrentUserFromMWS()
    • getCurrentUserPasswordFromMWS

      protected String getCurrentUserPasswordFromMWS()
    • useBasicForSAML

      protected boolean useBasicForSAML()
    • isMwsRuntime

      protected static boolean isMwsRuntime()
    • useSAML2ForHybrid

      public static boolean useSAML2ForHybrid()