org.apache.sling.engine.auth
Class AuthenticationInfo

java.lang.Object
  extended by org.apache.sling.engine.auth.AuthenticationInfo

public class AuthenticationInfo
extends java.lang.Object

The AuthenticationInfo defines the data returned from the AuthenticationHandler.authenticate(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method.


Field Summary
static AuthenticationInfo DOING_AUTH
          This object is returned by the AuthenticationHandler.authenticate(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method to indicate an ongoing authentication transaction.
 
Constructor Summary
AuthenticationInfo(java.lang.String authType, javax.jcr.Credentials credentials)
          Creates an instance of this class with the given authentication type and credentials connecting to the default workspace as if the AuthenticationInfo(String, Credentials, String) method would be called with a null workspace name.
AuthenticationInfo(java.lang.String authType, javax.jcr.Credentials credentials, java.lang.String workspaceName)
          Creates an instance of this class with the given authentication type and credentials.
 
Method Summary
 java.lang.String getAuthType()
          Returns type of authentication provisioning.
 javax.jcr.Credentials getCredentials()
          Returns the credentials extracted from the client request to use for authentication.
 java.lang.String getWorkspaceName()
          Returns the name of the workspace the user contained in this instance wishes to connect to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOING_AUTH

public static final AuthenticationInfo DOING_AUTH
This object is returned by the AuthenticationHandler.authenticate(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method to indicate an ongoing authentication transaction.

Constructor Detail

AuthenticationInfo

public AuthenticationInfo(java.lang.String authType,
                          javax.jcr.Credentials credentials)
Creates an instance of this class with the given authentication type and credentials connecting to the default workspace as if the AuthenticationInfo(String, Credentials, String) method would be called with a null workspace name.

Parameters:
authType - The authentication type, must not be null.
credentials - The credentials, must not be null.
See Also:
getAuthType(), getCredentials()

AuthenticationInfo

public AuthenticationInfo(java.lang.String authType,
                          javax.jcr.Credentials credentials,
                          java.lang.String workspaceName)
Creates an instance of this class with the given authentication type and credentials.

Parameters:
authType - The authentication type, must not be null.
credentials - The credentials, must not be null.
workspaceName - The name of the workspace to connect to, may be null to connect to the default workspace.
See Also:
getAuthType(), getCredentials()
Method Detail

getAuthType

public java.lang.String getAuthType()
Returns type of authentication provisioning.

If authentication is taking place through one of the standard ways, such as Basic or Digest, the return value is one of the predefined constants of the HttpServletRequest interface. Otherwise the value may be specific to the AuthenticationHandler implementation.


getCredentials

public javax.jcr.Credentials getCredentials()
Returns the credentials extracted from the client request to use for authentication.


getWorkspaceName

public java.lang.String getWorkspaceName()
Returns the name of the workspace the user contained in this instance wishes to connect to. This may be null, in which case the user is connected to the default workspace.



Copyright © 2007-2009. All Rights Reserved.