com.metamatrix.platform.security.membership.service
Class SuccessfulAuthenticationToken

java.lang.Object
  extended by com.metamatrix.platform.security.membership.service.SuccessfulAuthenticationToken
All Implemented Interfaces:
AuthenticationToken, java.io.Serializable

public final class SuccessfulAuthenticationToken
extends java.lang.Object
implements AuthenticationToken

SuccessfulAuthenticationToken.

Marker indicating successful authentication attempt. Membership SPI domain implementations should wrap the Serializable payload in an instance of this class to signify to the Membgership service that the domian successfully authenticated the given payload token.

As well as providing a holder for the Serializable payload, which may have been augmented or replaced by the authenticating membership domain, this class provides a holder for the user name of the authenticated user that may be used in the MetaMatrix system for such things as session tracking and authorization policies.

This wrapper class will not be exposed outside of the Membership framework.

See Also:
Serialized Form

Constructor Summary
SuccessfulAuthenticationToken(java.io.Serializable payload, java.lang.String username)
          SuccessfulAuthenticationToken
 
Method Summary
 java.lang.String getDomainName()
           
 java.io.Serializable getPayload()
          Get the payload token that has been successfully authenticated by a membership domain.
 java.lang.String getUserName()
          Get the exact username of the authenticated user as it is known to the authenticating membership domain.
 boolean isAuthenticated()
          The attempt to authenticate the given payload was successful.
 void setDomainName(java.lang.String domainName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuccessfulAuthenticationToken

public SuccessfulAuthenticationToken(java.io.Serializable payload,
                                     java.lang.String username)
SuccessfulAuthenticationToken

Indicate that successful user authentication has occurred.

MetaMatrix must know the user name of every user connected to the system. In particular, when MetaMatrix authorization policies (entitlements) are created, the users and groups that are assigned to these policies come from the membership domain.

Parameters:
payload - The successfully authenticated token. May be null.
username - The username of the authenticated user exactly as it is known by the authenticating membership domain. May not be null.
Method Detail

getPayload

public java.io.Serializable getPayload()
Get the payload token that has been successfully authenticated by a membership domain.

Specified by:
getPayload in interface AuthenticationToken
Returns:
The successfully authenticated token unmodified.

getUserName

public java.lang.String getUserName()
Get the exact username of the authenticated user as it is known to the authenticating membership domain.

Will be null if the user was not authenticated.

Specified by:
getUserName in interface AuthenticationToken
Returns:
The username (including case) of this authenticated user exactly as it is known by the authenticating membership domain.
Since:
5.0

isAuthenticated

public boolean isAuthenticated()
The attempt to authenticate the given payload was successful.

Specified by:
isAuthenticated in interface AuthenticationToken
Returns:
true - always.

getDomainName

public java.lang.String getDomainName()

setDomainName

public void setDomainName(java.lang.String domainName)


Copyright © 2009. All Rights Reserved.