org.codehaus.plexus.redback.system
Class DefaultSecuritySystem
java.lang.Object
org.codehaus.plexus.redback.system.DefaultSecuritySystem
- All Implemented Interfaces:
- SecuritySystem
@Service(value="securitySystem")
public class DefaultSecuritySystem
- extends java.lang.Object
- implements SecuritySystem
DefaultSecuritySystem:
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSecuritySystem
public DefaultSecuritySystem()
authenticate
public SecuritySession authenticate(AuthenticationDataSource source)
throws AuthenticationException,
UserNotFoundException,
AccountLockedException,
MustChangePasswordException
- delegate to the authentication system for boolean authentication checks,
if the result is authentic then pull the user object from the user
manager and add it to the session. If the result is false return the result in
an authenticated session and a null user object.
in the event of a successful authentication and a lack of corresponding user in the
usermanager return a null user as well
//todo should this last case create a user in the usermanager?
- Specified by:
authenticate in interface SecuritySystem
- Parameters:
source -
- Returns:
-
- Throws:
AuthenticationException
UserNotFoundException
MustChangePasswordException
AccountLockedException
MustChangePasswordException
isAuthenticated
public boolean isAuthenticated(AuthenticationDataSource source)
throws AuthenticationException,
UserNotFoundException,
AccountLockedException,
MustChangePasswordException
- Specified by:
isAuthenticated in interface SecuritySystem
- Throws:
AuthenticationException
UserNotFoundException
AccountLockedException
MustChangePasswordException
getAuthenticatorId
public java.lang.String getAuthenticatorId()
- Specified by:
getAuthenticatorId in interface SecuritySystem
authorize
public AuthorizationResult authorize(SecuritySession session,
java.lang.Object permission)
throws AuthorizationException
- Specified by:
authorize in interface SecuritySystem
- Throws:
AuthorizationException
authorize
public AuthorizationResult authorize(SecuritySession session,
java.lang.Object permission,
java.lang.Object resource)
throws AuthorizationException
- Specified by:
authorize in interface SecuritySystem
- Throws:
AuthorizationException
isAuthorized
public boolean isAuthorized(SecuritySession session,
java.lang.Object permission)
throws AuthorizationException
- Specified by:
isAuthorized in interface SecuritySystem
- Throws:
AuthorizationException
isAuthorized
public boolean isAuthorized(SecuritySession session,
java.lang.Object permission,
java.lang.Object resource)
throws AuthorizationException
- Specified by:
isAuthorized in interface SecuritySystem
- Throws:
AuthorizationException
getAuthorizerId
public java.lang.String getAuthorizerId()
- Specified by:
getAuthorizerId in interface SecuritySystem
getUserManager
public UserManager getUserManager()
- Specified by:
getUserManager in interface SecuritySystem
getUserManagementId
public java.lang.String getUserManagementId()
- Specified by:
getUserManagementId in interface SecuritySystem
getKeyManager
public KeyManager getKeyManager()
- Specified by:
getKeyManager in interface SecuritySystem
getKeyManagementId
public java.lang.String getKeyManagementId()
getPolicy
public UserSecurityPolicy getPolicy()
- Specified by:
getPolicy in interface SecuritySystem
getPolicyId
public java.lang.String getPolicyId()
getAuthenticationManager
public AuthenticationManager getAuthenticationManager()
getAuthorizer
public Authorizer getAuthorizer()
Copyright © 2006-2009 Codehaus. All Rights Reserved.