SiteMinder
Java SDK r12.51


com.netegrity.policyserver.smapi
Class SmAuthenticationContext

java.lang.Object
  extended by com.netegrity.policyserver.smapi.SmAuthenticationContext

public class SmAuthenticationContext
extends java.lang.Object

Contains the various context classes passed to the method authenticate() in the custom authentication scheme class, and provides set... methods that let the authentication scheme pass status and error messages to SiteMinder.

The set... methods in this class pass information directly to SiteMinder.

Since:
SDK 6.0

Method Summary
 APIContext getAPIContext()
          Retrieves the APIContext portion of this authentication context.
 int getMaxErrorTextSize()
          Retrieves the maximum number of bytes that can be passed in setErrorText().
 int getMaxUserTextSize()
          Retrieves the maximum number of bytes that can be passed in setUserText().
 long getSMFactoryHandle()
           
 long getSMFactoryInterface()
           
 UserContext getUserContext()
          Retrieves the UserContext portion of this authentication context.
 UserCredentialsContext getUserCredentialsContext()
          Retrieves the UserCredentialsContext portion of this authentication context.
 void setErrorText(java.lang.String errorText)
          Sets the error text response for this authentication request.
 void setUserText(java.lang.String userText)
          Sets the user text response for this authentication request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAPIContext

public APIContext getAPIContext()

Retrieves the APIContext portion of this authentication context.

The API context object lets you retrieve an AppSpecificContext object. It also provides methods for sending log, trace, and error messages to the Policy Server.

Returns:
The APIContext object.

getUserContext

public UserContext getUserContext()

Retrieves the UserContext portion of this authentication context.

The user context object includes user attributes and directory attributes associated with the user's entry in the user directory.

Returns:
The UserContext object.

getUserCredentialsContext

public UserCredentialsContext getUserCredentialsContext()

Retrieves the UserCredentialsContext portion of this authentication context.

The user credentials context object includes credentials information from the user directory where user context was established.

Returns:
The UserCredentialsContext object.

getMaxUserTextSize

public int getMaxUserTextSize()
Retrieves the maximum number of bytes that can be passed in setUserText().

Returns:
The maximum number of bytes for the user text message.

getSMFactoryInterface

public long getSMFactoryInterface()

getSMFactoryHandle

public long getSMFactoryHandle()

setUserText

public void setUserText(java.lang.String userText)

Sets the user text response for this authentication request.

The response can contain challenge text or any other message that the scheme developer wants to present to the user. The message is ultimately passed to the user through a mechanism external to SiteMinder -- for example, the agent stores this message in the HTTP_SM_USERMSG HTTP variable. For RADIUS authentication, the message is returned in the REPLY-MESSAGE response attribute.

This method also plays a role during user disambiguation and authentication. For information, see the descriptions of the return values for authenticate().

If the message length exceeds the maximum returned by getMaxUserTextSize(), the message is truncated.

The message you set with this method is passed directly to the Policy Server.

Parameters:
userText - The user text to pass to the Policy Server.

getMaxErrorTextSize

public int getMaxErrorTextSize()
Retrieves the maximum number of bytes that can be passed in setErrorText().

Returns:
The maximum number of bytes for the error text message.

setErrorText

public void setErrorText(java.lang.String errorText)

Sets the error text response for this authentication request. Use this method to send an error message to SiteMinder.

This method is also used to specify a URL in cases where the agent is to redirect the user. When you specify a redirection URL with this method, specify REASON_ERROR_MESSAGE_IS_REDIRECT in the reason parameter of the constructor for the SmAuthenticationResult you return from authenticate().

If the message length exceeds the maximum returned by getMaxErrorTextSize(), the message is truncated.

The message you set with this method is passed directly to the Policy Server.

Parameters:
errorText - The error text to pass to the Policy Server.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.