org.jboss.security.idm.demo
Class DemoLoginProvider

java.lang.Object
  extended by org.jboss.security.idm.demo.DemoLoginProvider
All Implemented Interfaces:
LoginProvider

public class DemoLoginProvider
extends java.lang.Object
implements LoginProvider


Constructor Summary
DemoLoginProvider()
           
 
Method Summary
 boolean exists(java.security.Principal principal)
          Checks if the specified Principal exists in the system anymore or not
 boolean exists(java.lang.String username)
          Checks if the specified username exists in the system anymore or not
 java.lang.String getId()
          Returns an id that uniquely identifies the LoginProvider plugged into the JBoss SSO system.
 boolean login(java.security.Principal principal, byte[] password)
          Checks if the specified Principal should successfully authenticated using the specified password
 boolean login(java.lang.String username, byte[] password)
          Checks if the specified username should be successfully authenticated using the specified password
 void processSSOLoginNotification(LoginContext loginContext)
          This notification is received from the SSO Engine when the engine performs an automatic logic based on a trusted assertion received from a partner site.
 Identity read(java.security.Principal principal)
          Returns the Identity data for the specified Principal
 Identity read(java.lang.String username)
          Returns the Identity data for the specified username
 java.util.Collection readAllRoles()
          Return all the authorization roles registered in the system.
 void setId(java.lang.String id)
          Sets the unique id for the LoginProvider
 void setProperties(java.util.Properties properties)
          Sets any properties like LDAP URLs, JDBC configuration, etc needed to configure this particular implementation of the LoginProvider
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoLoginProvider

public DemoLoginProvider()
Method Detail

getId

public java.lang.String getId()
                       throws IdentityException
Description copied from interface: LoginProvider
Returns an id that uniquely identifies the LoginProvider plugged into the JBoss SSO system. It should be of the form: si::

Specified by:
getId in interface LoginProvider
Returns:
id of the LoginProvider
Throws:
IdentityException

setId

public void setId(java.lang.String id)
           throws IdentityException
Sets the unique id for the LoginProvider

Specified by:
setId in interface LoginProvider
Parameters:
id -
Throws:
IdentityException

setProperties

public void setProperties(java.util.Properties properties)
                   throws IdentityException
Sets any properties like LDAP URLs, JDBC configuration, etc needed to configure this particular implementation of the LoginProvider

Specified by:
setProperties in interface LoginProvider
Parameters:
properties -
Throws:
IdentityException

read

public Identity read(java.security.Principal principal)
              throws IdentityException
Description copied from interface: LoginProvider
Returns the Identity data for the specified Principal

Specified by:
read in interface LoginProvider
Returns:
Identity data for the Principal
Throws:
IdentityException

read

public Identity read(java.lang.String username)
              throws IdentityException
Description copied from interface: LoginProvider
Returns the Identity data for the specified username

Specified by:
read in interface LoginProvider
Returns:
Identity data for the username
Throws:
IdentityException

exists

public boolean exists(java.security.Principal principal)
               throws IdentityException
Description copied from interface: LoginProvider
Checks if the specified Principal exists in the system anymore or not

Specified by:
exists in interface LoginProvider
Returns:
Throws:
IdentityException

exists

public boolean exists(java.lang.String username)
               throws IdentityException
Description copied from interface: LoginProvider
Checks if the specified username exists in the system anymore or not

Specified by:
exists in interface LoginProvider
Returns:
Throws:
IdentityException

login

public boolean login(java.security.Principal principal,
                     byte[] password)
              throws IdentityException
Description copied from interface: LoginProvider
Checks if the specified Principal should successfully authenticated using the specified password

Specified by:
login in interface LoginProvider
Returns:
Throws:
IdentityException

login

public boolean login(java.lang.String username,
                     byte[] password)
              throws IdentityException
Description copied from interface: LoginProvider
Checks if the specified username should be successfully authenticated using the specified password

Specified by:
login in interface LoginProvider
Returns:
Throws:
IdentityException

readAllRoles

public java.util.Collection readAllRoles()
                                  throws IdentityException
Description copied from interface: LoginProvider
Return all the authorization roles registered in the system. Note: this is a list of all the roles, and not specific to any particular user

Specified by:
readAllRoles in interface LoginProvider
Returns:
a Collection of all the authorization roles registered in the system
Throws:
IdentityException

processSSOLoginNotification

public void processSSOLoginNotification(LoginContext loginContext)
                                 throws IdentityException
Description copied from interface: LoginProvider
This notification is received from the SSO Engine when the engine performs an automatic logic based on a trusted assertion received from a partner site. The method can be used by the application to setup its environment in response to the user logged in to the system

Specified by:
processSSOLoginNotification in interface LoginProvider
Throws:
IdentityException