ome.security.auth
Class JdbcPasswordProvider

java.lang.Object
  extended by ome.security.auth.ConfigurablePasswordProvider
      extended by ome.security.auth.JdbcPasswordProvider
All Implemented Interfaces:
PasswordProvider, PasswordUtility

public class JdbcPasswordProvider
extends ConfigurablePasswordProvider

Central PasswordProvider which uses the "password" table in the central OMERO database.

Since:
4.0
Author:
Josh Moore, josh at glencoesoftware.com

Field Summary
protected  org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc
           
 
Fields inherited from class ome.security.auth.ConfigurablePasswordProvider
hash, ignoreUnknown, log
 
Constructor Summary
JdbcPasswordProvider(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc)
           
JdbcPasswordProvider(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc, boolean ignoreUnknown)
           
 
Method Summary
 void changePassword(String user, String password)
          Throws by default.
 Boolean checkPassword(String user, String password)
          Retrieves password from the database and calls ConfigurablePasswordProvider.comparePasswords(String, String).
 boolean hasPassword(String user)
          Always returns false, override with specific logic.
 
Methods inherited from class ome.security.auth.ConfigurablePasswordProvider
comparePasswords, encodePassword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdbc

protected final org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc
Constructor Detail

JdbcPasswordProvider

public JdbcPasswordProvider(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc)

JdbcPasswordProvider

public JdbcPasswordProvider(org.springframework.jdbc.core.simple.SimpleJdbcOperations jdbc,
                            boolean ignoreUnknown)
Method Detail

hasPassword

public boolean hasPassword(String user)
Description copied from class: ConfigurablePasswordProvider
Always returns false, override with specific logic.

Specified by:
hasPassword in interface PasswordProvider
Overrides:
hasPassword in class ConfigurablePasswordProvider

checkPassword

public Boolean checkPassword(String user,
                             String password)
Retrieves password from the database and calls ConfigurablePasswordProvider.comparePasswords(String, String). Uses default logic if user is unknown.

Specified by:
checkPassword in interface PasswordProvider
Overrides:
checkPassword in class ConfigurablePasswordProvider

changePassword

public void changePassword(String user,
                           String password)
                    throws PasswordChangeException
Description copied from class: ConfigurablePasswordProvider
Throws by default.

Specified by:
changePassword in interface PasswordProvider
Overrides:
changePassword in class ConfigurablePasswordProvider
Throws:
PasswordChangeException


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.