Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.api.login
Interface Authenticator

All Known Subinterfaces:
UserManager
All Known Implementing Classes:
FakeUserManagerImpl, UserManagerImpl, UserManagerWithComputedGroups

public interface Authenticator

Authenticate the given username against the given password.

This service should be exposed by a user manager framework implementation.

Author:
Bogdan Stefanescu

Method Summary
 Principal authenticate(String name, String password)
          Get a principal object for the given username if the username / password pair is valid, otherwise returns null.
 boolean checkUsernamePassword(String name, String password)
          Check the password for the given username.
 

Method Detail

authenticate

Principal authenticate(String name,
                       String password)
                       throws Exception
Get a principal object for the given username if the username / password pair is valid, otherwise returns null.

This method is doing the authentication of the given username / password pair and returns the corresponding principal object if authentication succeeded otherwise returns null.

Parameters:
name -
password -
Returns:
the authenticated principal if authentication succeded otherwise null
Throws:
Exception - - if an exception occurs

checkUsernamePassword

boolean checkUsernamePassword(String name,
                              String password)
                              throws Exception
Check the password for the given username. Returns true if the username / password pair match, false otherwise.

Parameters:
name - the username
password - the password to check
Returns:
true is valid, false otherwise
Throws:
Exception - - if an exception occurs

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.