|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ops4j.pax.wicket.util.UserAdminAuthenticator
public class UserAdminAuthenticator
This is a PaxWicketAuthenticator that uses the User Admin Service as specified in the OSGi R4 specification.
The ApplicationName must be provided in the constructor, and it will be used as the name space of the users and credentials in the User Admin service.
The user will be obtained thru the call;
User user = userAdmin.getUser( m_applicationName + ".userid", username );
and the credentials are checked with;
boolean authenticated = user.hasCredential( m_applicationName + ".password", password ) );
The Roles returned lacks any name space or prefixing.
All authentication will fail if no UserAdmin service is registered in the OSGi framework.
| Constructor Summary | |
|---|---|
UserAdminAuthenticator(org.osgi.framework.BundleContext bundleContext,
java.lang.String applicationName)
Constructor for the UserAdminAuthenticator. |
|
| Method Summary | |
|---|---|
org.apache.wicket.authorization.strategies.role.Roles |
authenticate(java.lang.String username,
java.lang.String password)
Authenticate the specified userName with the specified password. |
void |
dispose()
Releases all the resources used by this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserAdminAuthenticator(org.osgi.framework.BundleContext bundleContext,
java.lang.String applicationName)
throws java.lang.IllegalArgumentException
bundleContext - The bundleContext of the Bundle where this class is used.applicationName - The name of the Pax Wicket application. This is the same as the name
registered in the PaxWicketApplicationFactory and used in all
ContentAggregators and ContentSources.
java.lang.IllegalArgumentException - if the bundleContext or the applicationName
arguments are null.| Method Detail |
|---|
public void dispose()
public org.apache.wicket.authorization.strategies.role.Roles authenticate(java.lang.String username,
java.lang.String password)
userName with the specified password. Returns null if the
specified userName is not authenticate.
authenticate in interface PaxWicketAuthenticatorusername - The username to authenticate.password - The password to authenticate.
Roles if the arguments can be authenticated, null otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||