|
||||||||||
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()
AuthenticationProviderProxy
Returns the default authentication provider.
getDefaultAuthenticationProvider
in interface AuthenticationProviderProxy
AuthenticationProviderProxy.getDefaultAuthenticationProvider()
public java.lang.String getAuthenticationProvider(java.lang.String userName)
AuthenticationProviderProxy
Returns the authentication provider of a user principal.
getAuthenticationProvider
in interface AuthenticationProviderProxy
AuthenticationProviderProxy.getAuthenticationProvider(java.lang.String)
public boolean isUserPrincipal(java.lang.String userName)
UserSecurityHandler
Checks if a UserPrincipal exists
isUserPrincipal
in interface UserSecurityHandler
UserSecurityHandler.isUserPrincipal(java.lang.String)
public java.security.Principal getUserPrincipal(java.lang.String username)
UserSecurityHandler
Gets the user principal for the given user name.
getUserPrincipal
in interface UserSecurityHandler
username
- The user name.
Principal- See Also:
UserSecurityHandler.getUserPrincipal(java.lang.String)
public java.util.List getUserPrincipals(java.lang.String filter)
UserSecurityHandler
Gets the an iterator of user principals for a given filter.
getUserPrincipals
in interface UserSecurityHandler
filter
- The filter.
Principal
UserSecurityHandler.getUserPrincipals(java.lang.String)
public void addUserPrincipal(UserPrincipal userPrincipal, java.lang.String authenticationProvider) throws SecurityException
AuthenticationProviderProxy
Adds a new user principal in a given authentication provider.
addUserPrincipal
in interface AuthenticationProviderProxy
userPrincipal
- 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
UserSecurityHandler
Adds a new user principal in the backing store.
addUserPrincipal
in interface UserSecurityHandler
userPrincipal
- 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
AuthenticationProviderProxy
Updates user principal in a given authentication provider.
updateUserPrincipal
in interface AuthenticationProviderProxy
userPrincipal
- 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
UserSecurityHandler
Updates the user principal in the backing store.
updateUserPrincipal
in interface UserSecurityHandler
userPrincipal
- The UserPrincipal
.
SecurityException
- Throws a SecurityException
.UserSecurityHandler.updateUserPrincipal(org.apache.jetspeed.security.UserPrincipal)
public void removeUserPrincipal(UserPrincipal userPrincipal, java.lang.String authenticationProvider) throws SecurityException
AuthenticationProviderProxy
Remove user principal in a given authentication provider.
removeUserPrincipal
in interface AuthenticationProviderProxy
userPrincipal
- 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
UserSecurityHandler
Removes the user principal.
removeUserPrincipal
in interface UserSecurityHandler
userPrincipal
- The UserPrincipal
.
SecurityException
- Throws a SecurityException
.UserSecurityHandler.removeUserPrincipal(org.apache.jetspeed.security.UserPrincipal)
public java.util.Set getPublicCredentials(java.lang.String username)
CredentialHandler
Gets the public credentials for the user.
getPublicCredentials
in interface CredentialHandler
username
- 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 AuthenticationProviderProxy
userName
- 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 CredentialHandler
oldPassword
- 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 AuthenticationProviderProxy
newPassword
- 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 AuthenticationProviderProxy
importPassword
in interface CredentialHandler
newPassword
- 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)
CredentialHandler
Gets the private credentials for the user.
getPrivateCredentials
in interface CredentialHandler
username
- The username.
CredentialHandler.getPrivateCredentials(java.lang.String)
public void setPasswordEnabled(java.lang.String userName, boolean enabled, java.lang.String authenticationProvider) throws SecurityException
AuthenticationProviderProxy
Set the enabled state of the user password credential in a given authentication provider.
setPasswordEnabled
in interface AuthenticationProviderProxy
userName
- The user name.enabled
- The enabled state.authenticationProvider
- The authentication provider name.
SecurityException
AuthenticationProviderProxy.setPasswordEnabled(java.lang.String, boolean, java.lang.String)
public void setPasswordEnabled(java.lang.String userName, boolean enabled) throws SecurityException
CredentialHandler
Set the enabled state of the user password credential.
setPasswordEnabled
in interface CredentialHandler
userName
- The user name.enabled
- The enabled state.
SecurityException
CredentialHandler.setPasswordEnabled(java.lang.String, boolean)
public void setPasswordUpdateRequired(java.lang.String userName, boolean updateRequired, java.lang.String authenticationProvider) throws SecurityException
AuthenticationProviderProxy
Set the update required state of the user password credential in a given authentication provider.
setPasswordUpdateRequired
in interface AuthenticationProviderProxy
userName
- The user name.updateRequired
- The update required state.authenticationProvider
- The authentication provider name.
SecurityException
AuthenticationProviderProxy.setPasswordUpdateRequired(java.lang.String, boolean, java.lang.String)
public void setPasswordUpdateRequired(java.lang.String userName, boolean updateRequired) throws SecurityException
CredentialHandler
Set the update required state of the user password credential.
setPasswordUpdateRequired
in interface CredentialHandler
userName
- The user name.updateRequired
- The update required state.
SecurityException
CredentialHandler.setPasswordUpdateRequired(java.lang.String, boolean)
public void setPasswordExpiration(java.lang.String userName, java.sql.Date expirationDate, java.lang.String authenticationProvider) throws SecurityException
AuthenticationProviderProxy
Set 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 AuthenticationProviderProxy
userName
- The user name.expirationDate
- The expiration date to set.authenticationProvider
- The authentication provider name.
SecurityException
AuthenticationProviderProxy.setPasswordExpiration(java.lang.String, java.sql.Date, java.lang.String)
public void setPasswordExpiration(java.lang.String userName, java.sql.Date expirationDate) throws SecurityException
CredentialHandler
Set 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 CredentialHandler
userName
- The user name.expirationDate
- The expiration date to set.
SecurityException
CredentialHandler.setPasswordExpiration(java.lang.String, java.sql.Date)
public boolean authenticate(java.lang.String userName, java.lang.String password, java.lang.String authenticationProvider) throws SecurityException
AuthenticationProviderProxy
Authenticate a user in a given authentication provider
authenticate
in interface AuthenticationProviderProxy
userName
- The user name.password
- The user password.authenticationProvider
- The authentication provider name.
SecurityException
AuthenticationProviderProxy.authenticate(String, String, String)
public boolean authenticate(java.lang.String userName, java.lang.String password) throws SecurityException
CredentialHandler
Authenticate a user.
authenticate
in interface CredentialHandler
userName
- The user name.password
- The user password.
SecurityException
CredentialHandler.authenticate(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |