org.nakedobjects.metamodel.authentication
Interface AuthenticationSession

All Superinterfaces:
Encodable
All Known Implementing Classes:
AuthenticationSessionAbstract, AuthenticationSessionNoRuntime

public interface AuthenticationSession
extends Encodable

The representation within the system of an authenticated user.


Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
          For viewers (in particular) to store additional attributes, analogous to an HttpSession.
 java.util.List<java.lang.String> getRoles()
          The roles this user belongs to
 java.lang.String getUserName()
          The name of the authenticated user; for display purposes only.
 java.lang.String getValidationCode()
          A unique code given to this session during authentication.
 boolean hasUserNameOf(java.lang.String userName)
           
 void setAttribute(java.lang.String attributeName, java.lang.Object attribute)
           
 
Methods inherited from interface org.nakedobjects.metamodel.commons.encoding.Encodable
encode
 

Method Detail

getUserName

java.lang.String getUserName()
The name of the authenticated user; for display purposes only.


hasUserNameOf

boolean hasUserNameOf(java.lang.String userName)

getRoles

java.util.List<java.lang.String> getRoles()
The roles this user belongs to


getValidationCode

java.lang.String getValidationCode()
A unique code given to this session during authentication.

This can be used to confirm that this session has been properly created and the user has been authenticated. It should return an empty string ("") if this is unauthenticated user (i.e., as created within an exploration system).


getAttribute

java.lang.Object getAttribute(java.lang.String attributeName)
For viewers (in particular) to store additional attributes, analogous to an HttpSession.


setAttribute

void setAttribute(java.lang.String attributeName,
                  java.lang.Object attribute)
See Also:
getAttribute(String)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.