com.webmethods.caf.wsclient
Class AuthCredentials

java.lang.Object
  extended by 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:
Serialized Form

Field Summary
static String BASIC_AUTH_DEFAULT_PASSWORD
           
static AuthCredentials EMPTY_AUTH
          If you're webservice doesn't require auth, you should use this static AuthCredentials
protected  int m_authMethod
           
protected  String m_password
           
protected  String m_userName
          Username for SAML/basic hybrid authentication
static int METHOD_BASIC
           
static int METHOD_HYBRID
           
static int METHOD_NONCE
           
static int METHOD_NONE
           
static int METHOD_SAML
           
static AuthCredentials NONCE_AUTH
          Deprecated. AuthCredentials that use a Nonce factory for authenication
static String PROP_BASIC_DEFAULT_PASSWORD
           
static String PROP_SAML_USE_BASIC
           
protected static Boolean s_isMwsRuntime
           
static AuthCredentials SAML_AUTH
          AuthCredentials to force SAML authentication
static AuthCredentials SAML_HYBRID_AUTH
          AuthCredentials to force a Basic/SAML hybrid authentication.
 
Constructor Summary
AuthCredentials(AuthCredentials authCredentials)
           
AuthCredentials(int authenticationMethod)
           
AuthCredentials(String userName, String password)
           
AuthCredentials(String userName, String password, boolean requiresAuth)
          Deprecated. requiresAuth is no longer a valid parameter, use username/pass version of constructor
 
Method Summary
 AuthCredentials clone()
           
 boolean equals(Object thatObj)
           
 boolean getAllowNullPasswords()
           
 String getArtifact()
           
protected  IArtifactFactory getArtifactFactory()
           
 int getAuthenticationMethod()
           
protected  WSClientConfig getClientConfig()
           
protected  String getCurrentUserFromMWS()
           
protected  String getCurrentUserPasswordFromMWS()
           
 String getID()
          This is used by the IWSClientSessionManager instance in order to build up a unique Key for different sessions
 String getPassword()
           
 boolean getRequiresAuth()
           
 boolean getUseNonce()
           
 String getUserName()
           
 boolean getUseSAML()
           
protected static boolean isMwsRuntime()
           
 void setAllowNullPasswords(boolean newVal)
           
 void setAuthenticationMethod(int newVal)
           
 void setPassword(String newVal)
           
 void setRequiresAuth(boolean newVal)
           
 void setUseNonce()
           
 void setUserName(String newVal)
           
protected  boolean useBasicForSAML()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SAML_USE_BASIC

public static final String PROP_SAML_USE_BASIC
See Also:
Constant Field Values

PROP_BASIC_DEFAULT_PASSWORD

public static final String PROP_BASIC_DEFAULT_PASSWORD
See Also:
Constant Field Values

BASIC_AUTH_DEFAULT_PASSWORD

public static String BASIC_AUTH_DEFAULT_PASSWORD

METHOD_NONE

public static final int METHOD_NONE
See Also:
Constant Field Values

METHOD_BASIC

public static final int METHOD_BASIC
See Also:
Constant Field Values

METHOD_SAML

public static final int METHOD_SAML
See Also:
Constant Field Values

METHOD_HYBRID

public static final int METHOD_HYBRID
See Also:
Constant Field Values

METHOD_NONCE

public static final int METHOD_NONCE
See Also:
Constant Field Values

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 Detail

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 Detail

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:
WSClientConfig.getArtifactFactory()

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()