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, org.springframework.context.ApplicationContextAware

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
 
Fields inherited from class ome.security.auth.ConfigurablePasswordProvider
ctx, hash, ignoreUnknown, log, util
 
Constructor Summary
JdbcPasswordProvider(PasswordUtil util)
           
JdbcPasswordProvider(PasswordUtil util, boolean ignoreUnknown)
           
 
Method Summary
 void changePassword(String user, String password)
          Throws by default.
 Boolean checkPassword(String user, String password, boolean readOnly)
          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, loginAttempt, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcPasswordProvider

public JdbcPasswordProvider(PasswordUtil util)

JdbcPasswordProvider

public JdbcPasswordProvider(PasswordUtil util,
                            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,
                             boolean readOnly)
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: 4.3.4-dbcbce5a-b4

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