Esri Geoportal Server
1.0

com.esri.gpt.framework.security.identity
Class AuthenticationStatus

java.lang.Object
  extended by com.esri.gpt.framework.security.identity.AuthenticationStatus

public class AuthenticationStatus
extends Object

Authentication status associated with a user.


Constructor Summary
AuthenticationStatus()
          Default constructor.
 
Method Summary
 void assertLoggedIn()
          Asserts that the active user is logged in.
 void authorizeAction(RoleSet rolesForAction)
          Authorizes an action based upon the authenticated roles for the current user and a supplied role set for the action.
 RoleSet getAuthenticatedRoles()
          Gets the set of authenticated roles.
 boolean getWasAuthenticated()
          Gets the status indicating whether of not authentication was successful.
 void reset()
          Resets the authentication status.
 void setWasAuthenticated(boolean wasAuthenticated)
          Sets the status indicating whether of not authentication was successful.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticationStatus

public AuthenticationStatus()
Default constructor.

Method Detail

getAuthenticatedRoles

public RoleSet getAuthenticatedRoles()
Gets the set of authenticated roles.

Returns:
the set of authenticated roles

getWasAuthenticated

public boolean getWasAuthenticated()
Gets the status indicating whether of not authentication was successful.

Returns:
true if authentication was successful

setWasAuthenticated

public void setWasAuthenticated(boolean wasAuthenticated)
Sets the status indicating whether of not authentication was successful.

Parameters:
wasAuthenticated - true if authentication was successful

assertLoggedIn

public void assertLoggedIn()
                    throws NotAuthorizedException
Asserts that the active user is logged in.

Throws:
NotAuthorizedException - if the user is not logged in

authorizeAction

public void authorizeAction(RoleSet rolesForAction)
                     throws NotAuthorizedException
Authorizes an action based upon the authenticated roles for the current user and a supplied role set for the action.
The current user must have at least one of the roles associated with the action.
If the supplied rolseForAction is null or empty, the action is authorized.

Parameters:
rolesForAction - the set of roles associated with the action
Throws:
NotAuthorizedException - if the user does not have a required role

reset

public void reset()
Resets the authentication status.


Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.