org.mortbay.http
Class SecurityConstraint.Nobody
java.lang.Object
|
+--org.mortbay.http.SecurityConstraint.Nobody
- All Implemented Interfaces:
- java.security.Principal, UserPrincipal
- Enclosing class:
- SecurityConstraint
- public static class SecurityConstraint.Nobody
- extends java.lang.Object
- implements UserPrincipal
Nobody user.
The Nobody UserPrincipal is used to indicate a partial state of
authentication. A request with a Nobody UserPrincipal will be allowed
past all authentication constraints - but will not be considered an
authenticated request. It can be used by Authenticators such as
FormAuthenticator to allow access to logon and error pages within an
authenticated URI tree.
Method Summary |
java.lang.String |
getName()
|
boolean |
isAuthenticated()
Check authentication status. |
boolean |
isUserInRole(java.lang.String role)
Check if the user is in a role. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Principal |
equals, hashCode, toString |
SecurityConstraint.Nobody
public SecurityConstraint.Nobody()
getName
public java.lang.String getName()
- Specified by:
getName
in interface java.security.Principal
isAuthenticated
public boolean isAuthenticated()
- Description copied from interface:
UserPrincipal
- Check authentication status.
Implementations of this method may adorn the calling context to
assoicate it with the authenticated principal (eg ThreadLocals). If
such context associations are made, they should be considered valid
until a UserRealm.deAuthenticate(UserPrincipal) call is made for this
UserPrincipal.
- Specified by:
isAuthenticated
in interface UserPrincipal
- Returns:
- True if this user is still authenticated.
isUserInRole
public boolean isUserInRole(java.lang.String role)
- Description copied from interface:
UserPrincipal
- Check if the user is in a role.
- Specified by:
isUserInRole
in interface UserPrincipal
- Parameters:
role
- A role name.
- Returns:
- True if the user can act in that role.
Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.