|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.security.impl.AuthenticationProviderProxyImpl
public class AuthenticationProviderProxyImpl
AuthenticationProviderProxy| Constructor Summary | |
|---|---|
AuthenticationProviderProxyImpl(java.util.List authenticationProviders,
java.lang.String defaultAuthenticationProvider)
Constructor given a list of AuthenticationProvider. |
|
| Method Summary | |
|---|---|
void |
addUserPrincipal(UserPrincipal userPrincipal)
Adds a new user principal in the backing store. |
void |
addUserPrincipal(UserPrincipal userPrincipal,
java.lang.String authenticationProvider)
Adds a new user principal in a given authentication provider. |
boolean |
authenticate(java.lang.String userName,
java.lang.String password)
Authenticate a user. |
boolean |
authenticate(java.lang.String userName,
java.lang.String password,
java.lang.String authenticationProvider)
Authenticate a user in a given authentication provider |
java.lang.String |
getAuthenticationProvider(java.lang.String userName)
Returns the authentication provider of a user principal. |
protected AuthenticationProvider |
getAuthenticationProviderByName(java.lang.String providerName)
|
java.lang.String |
getDefaultAuthenticationProvider()
Returns the default authentication provider. |
java.util.Set |
getPrivateCredentials(java.lang.String username)
Gets the private credentials for the user. |
java.util.Set |
getPublicCredentials(java.lang.String username)
Gets the public credentials for the user. |
java.security.Principal |
getUserPrincipal(java.lang.String username)
Gets the user principal for the given user name. |
java.util.List |
getUserPrincipals(java.lang.String filter)
Gets the an iterator of user principals for a given filter. |
void |
importPassword(java.lang.String userName,
java.lang.String newPassword)
Adds or updates a private password credentialin a given authentication provider. Note that there is no checking of the oldPassword and the provided password is
assumed to be encoded. |
void |
importPassword(java.lang.String userName,
java.lang.String newPassword,
java.lang.String authenticationProvider)
Adds or updates a private password credentialin a given authentication provider. Note that there is no checking of the oldPassword and the provided password is
assumed to be encoded. |
boolean |
isUserPrincipal(java.lang.String userName)
Checks if a UserPrincipal exists |
void |
removeUserPrincipal(UserPrincipal userPrincipal)
Removes the user principal. |
void |
removeUserPrincipal(UserPrincipal userPrincipal,
java.lang.String authenticationProvider)
Remove user principal in a given authentication provider. |
void |
setPassword(java.lang.String userName,
java.lang.String oldPassword,
java.lang.String newPassword)
Adds or updates a private password credential. If oldPassword is not null, the oldPassword will first be checked (authenticated). |
void |
setPassword(java.lang.String userName,
java.lang.String oldPassword,
java.lang.String newPassword,
java.lang.String authenticationProvider)
Adds or updates a private password credential in a given authentication provider. If oldPassword is not null, the oldPassword will first be checked (authenticated). |
void |
setPasswordEnabled(java.lang.String userName,
boolean enabled)
Set the enabled state of the user password credential. |
void |
setPasswordEnabled(java.lang.String userName,
boolean enabled,
java.lang.String authenticationProvider)
Set the enabled state of the user password credential in a given authentication provider. |
void |
setPasswordExpiration(java.lang.String userName,
java.sql.Date expirationDate)
Set the expiration date and the expired flag of the password credential. |
void |
setPasswordExpiration(java.lang.String userName,
java.sql.Date expirationDate,
java.lang.String authenticationProvider)
Set the expiration date and the expired flag of the password credential in a given authentication provider |
void |
setPasswordUpdateRequired(java.lang.String userName,
boolean updateRequired)
Set the update required state of the user password credential. |
void |
setPasswordUpdateRequired(java.lang.String userName,
boolean updateRequired,
java.lang.String authenticationProvider)
Set the update required state of the user password credential in a given authentication provider. |
void |
updateUserPrincipal(UserPrincipal userPrincipal)
Updates the user principal in the backing store. |
void |
updateUserPrincipal(UserPrincipal userPrincipal,
java.lang.String authenticationProvider)
Updates user principal in a given authentication provider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticationProviderProxyImpl(java.util.List authenticationProviders,
java.lang.String defaultAuthenticationProvider)
Constructor given a list of AuthenticationProvider.
authenticationProviders - The list of AuthenticationProvider.defaultAuthenticationProvider - The default authentication provider name.| Method Detail |
|---|
protected AuthenticationProvider getAuthenticationProviderByName(java.lang.String providerName)
public java.lang.String getDefaultAuthenticationProvider()
AuthenticationProviderProxyReturns the default authentication provider.
getDefaultAuthenticationProvider in interface AuthenticationProviderProxyAuthenticationProviderProxy.getDefaultAuthenticationProvider()public java.lang.String getAuthenticationProvider(java.lang.String userName)
AuthenticationProviderProxyReturns the authentication provider of a user principal.
getAuthenticationProvider in interface AuthenticationProviderProxyAuthenticationProviderProxy.getAuthenticationProvider(java.lang.String)public boolean isUserPrincipal(java.lang.String userName)
UserSecurityHandlerChecks if a UserPrincipal exists
isUserPrincipal in interface UserSecurityHandlerUserSecurityHandler.isUserPrincipal(java.lang.String)public java.security.Principal getUserPrincipal(java.lang.String username)
UserSecurityHandlerGets the user principal for the given user name.
getUserPrincipal in interface UserSecurityHandlerusername - The user name.
Principal- See Also:
UserSecurityHandler.getUserPrincipal(java.lang.String)public java.util.List getUserPrincipals(java.lang.String filter)
UserSecurityHandlerGets the an iterator of user principals for a given filter.
getUserPrincipals in interface UserSecurityHandlerfilter - The filter.
PrincipalUserSecurityHandler.getUserPrincipals(java.lang.String)
public void addUserPrincipal(UserPrincipal userPrincipal,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxyAdds a new user principal in a given authentication provider.
addUserPrincipal in interface AuthenticationProviderProxyuserPrincipal - The new user principal.authenticationProvider - The authentication provider name.
SecurityException - Throws a security exception.AuthenticationProviderProxy.addUserPrincipal(org.apache.jetspeed.security.UserPrincipal,
java.lang.String)
public void addUserPrincipal(UserPrincipal userPrincipal)
throws SecurityException
UserSecurityHandlerAdds a new user principal in the backing store.
addUserPrincipal in interface UserSecurityHandleruserPrincipal - The new UserPrincipal.
SecurityException - Throws a SecurityException.UserSecurityHandler.addUserPrincipal(org.apache.jetspeed.security.UserPrincipal)
public void updateUserPrincipal(UserPrincipal userPrincipal,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxyUpdates user principal in a given authentication provider.
updateUserPrincipal in interface AuthenticationProviderProxyuserPrincipal - The user principal.authenticationProvider - The authentication provider name.
SecurityException - Throws a security exception.AuthenticationProviderProxy.updateUserPrincipal(org.apache.jetspeed.security.UserPrincipal,
java.lang.String)
public void updateUserPrincipal(UserPrincipal userPrincipal)
throws SecurityException
UserSecurityHandlerUpdates the user principal in the backing store.
updateUserPrincipal in interface UserSecurityHandleruserPrincipal - The UserPrincipal.
SecurityException - Throws a SecurityException.UserSecurityHandler.updateUserPrincipal(org.apache.jetspeed.security.UserPrincipal)
public void removeUserPrincipal(UserPrincipal userPrincipal,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxyRemove user principal in a given authentication provider.
removeUserPrincipal in interface AuthenticationProviderProxyuserPrincipal - The user principal.authenticationProvider - The authentication provider name.
SecurityException - Throws a security exception.AuthenticationProviderProxy.removeUserPrincipal(org.apache.jetspeed.security.UserPrincipal,
java.lang.String)
public void removeUserPrincipal(UserPrincipal userPrincipal)
throws SecurityException
UserSecurityHandlerRemoves the user principal.
removeUserPrincipal in interface UserSecurityHandleruserPrincipal - The UserPrincipal.
SecurityException - Throws a SecurityException.UserSecurityHandler.removeUserPrincipal(org.apache.jetspeed.security.UserPrincipal)public java.util.Set getPublicCredentials(java.lang.String username)
CredentialHandlerGets the public credentials for the user.
getPublicCredentials in interface CredentialHandlerusername - The username.
CredentialHandler.getPublicCredentials(java.lang.String)
public void setPassword(java.lang.String userName,
java.lang.String oldPassword,
java.lang.String newPassword,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxy
Adds or updates a private password credential in a given authentication provider.
If oldPassword is not null, the oldPassword will first be checked (authenticated).
setPassword in interface AuthenticationProviderProxyuserName - The name of the user to be updated.oldPassword - The old password value.newPassword - The new password value.authenticationProvider - The authentication provider name.
SecurityException - Throws a SecurityException.AuthenticationProviderProxy.setPassword(String, String, String, String)
public void setPassword(java.lang.String userName,
java.lang.String oldPassword,
java.lang.String newPassword)
throws SecurityException
CredentialHandler
Adds or updates a private password credential.
If oldPassword is not null, the oldPassword will first be checked (authenticated).
setPassword in interface CredentialHandleroldPassword - The old password.newPassword - The new password.
SecurityException - Throws a SecurityException.CredentialHandler.setPassword(java.lang.String,java.lang.String,java.lang.String)
public void importPassword(java.lang.String userName,
java.lang.String newPassword,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxy
Adds or updates a private password credentialin a given authentication provider.
Note that there is no checking of the oldPassword and the provided password is
assumed to be encoded. Hence no encoding will take place.
importPassword in interface AuthenticationProviderProxynewPassword - The new password.authenticationProvider - The authentication provider name.
SecurityException - Throws a SecurityException.org.apache.jetspeed.security.AuthenticationProviderProxy#importPassword(String, String, String, String)
public void importPassword(java.lang.String userName,
java.lang.String newPassword)
throws SecurityException
AuthenticationProviderProxy
Adds or updates a private password credentialin a given authentication provider.
Note that there is no checking of the oldPassword and the provided password is
assumed to be encoded. Hence no encoding will take place.
importPassword in interface AuthenticationProviderProxyimportPassword in interface CredentialHandlernewPassword - The new password.
SecurityException - Throws a SecurityException.org.apache.jetspeed.security.spi.CredentialHandler#importPassword(java.lang.String,java.lang.String,java.lang.String)public java.util.Set getPrivateCredentials(java.lang.String username)
CredentialHandlerGets the private credentials for the user.
getPrivateCredentials in interface CredentialHandlerusername - The username.
CredentialHandler.getPrivateCredentials(java.lang.String)
public void setPasswordEnabled(java.lang.String userName,
boolean enabled,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxySet the enabled state of the user password credential in a given authentication provider.
setPasswordEnabled in interface AuthenticationProviderProxyuserName - The user name.enabled - The enabled state.authenticationProvider - The authentication provider name.
SecurityExceptionAuthenticationProviderProxy.setPasswordEnabled(java.lang.String, boolean, java.lang.String)
public void setPasswordEnabled(java.lang.String userName,
boolean enabled)
throws SecurityException
CredentialHandlerSet the enabled state of the user password credential.
setPasswordEnabled in interface CredentialHandleruserName - The user name.enabled - The enabled state.
SecurityExceptionCredentialHandler.setPasswordEnabled(java.lang.String, boolean)
public void setPasswordUpdateRequired(java.lang.String userName,
boolean updateRequired,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxySet the update required state of the user password credential in a given authentication provider.
setPasswordUpdateRequired in interface AuthenticationProviderProxyuserName - The user name.updateRequired - The update required state.authenticationProvider - The authentication provider name.
SecurityExceptionAuthenticationProviderProxy.setPasswordUpdateRequired(java.lang.String, boolean, java.lang.String)
public void setPasswordUpdateRequired(java.lang.String userName,
boolean updateRequired)
throws SecurityException
CredentialHandlerSet the update required state of the user password credential.
setPasswordUpdateRequired in interface CredentialHandleruserName - The user name.updateRequired - The update required state.
SecurityExceptionCredentialHandler.setPasswordUpdateRequired(java.lang.String, boolean)
public void setPasswordExpiration(java.lang.String userName,
java.sql.Date expirationDate,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxySet the expiration date and the expired flag of the password credential in a given authentication provider
If a date equal or before the current date is provided, the expired flag will be set to true, otherwise to false.
setPasswordExpiration in interface AuthenticationProviderProxyuserName - The user name.expirationDate - The expiration date to set.authenticationProvider - The authentication provider name.
SecurityExceptionAuthenticationProviderProxy.setPasswordExpiration(java.lang.String, java.sql.Date, java.lang.String)
public void setPasswordExpiration(java.lang.String userName,
java.sql.Date expirationDate)
throws SecurityException
CredentialHandlerSet the expiration date and the expired flag of the password credential.
If a date equal or before the current date is provided, the expired flag will be set to true, otherwise to false.
setPasswordExpiration in interface CredentialHandleruserName - The user name.expirationDate - The expiration date to set.
SecurityExceptionCredentialHandler.setPasswordExpiration(java.lang.String, java.sql.Date)
public boolean authenticate(java.lang.String userName,
java.lang.String password,
java.lang.String authenticationProvider)
throws SecurityException
AuthenticationProviderProxyAuthenticate a user in a given authentication provider
authenticate in interface AuthenticationProviderProxyuserName - The user name.password - The user password.authenticationProvider - The authentication provider name.
SecurityExceptionAuthenticationProviderProxy.authenticate(String, String, String)
public boolean authenticate(java.lang.String userName,
java.lang.String password)
throws SecurityException
CredentialHandlerAuthenticate a user.
authenticate in interface CredentialHandleruserName - The user name.password - The user password.
SecurityExceptionCredentialHandler.authenticate(java.lang.String, java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||