Daisy Open Source CMS

org.outerj.daisy.authentication.spi
Interface AuthenticationScheme

All Known Implementing Classes:
CachingAuthenticationScheme

public interface AuthenticationScheme

Interface to be implemented by (password-based) authentication mechanisms.

The AuthenticationScheme should be registered as a plugin with the PluginRegistry


Method Summary
 boolean check(Credentials credentials)
           
 void clearCaches()
          Clear caches maintained by this authentication scheme, if any.
 User createUser(Credentials crendentials, UserManager userManager)
          If a user does not exist, the authentication scheme can be offered the possibility to create the user (this is defined in the configuration of the UserAuthenticator).
 String getDescription()
           
 

Method Detail

getDescription

String getDescription()

check

boolean check(Credentials credentials)
              throws AuthenticationException
Returns:
true if authentication successful, false otherwise
Throws:
AuthenticationException - if an error occured while authenticating

clearCaches

void clearCaches()
Clear caches maintained by this authentication scheme, if any.


createUser

User createUser(Credentials crendentials,
                UserManager userManager)
                throws AuthenticationException
If a user does not exist, the authentication scheme can be offered the possibility to create the user (this is defined in the configuration of the UserAuthenticator). It is up to the implementation of this method to check the credentials are ok.

Throws:
AuthenticationException

Daisy Open Source CMS