org.kuali.rice.ksb.security.credentials
Class UsernamePasswordCredentialsSource

java.lang.Object
  extended by org.kuali.rice.ksb.security.credentials.UsernamePasswordCredentialsSource
All Implemented Interfaces:
CredentialsSource

public final class UsernamePasswordCredentialsSource
extends Object
implements CredentialsSource

Implementation of a CredentialsSource that contains a username and password.

Note that this implementation is for service-to-service authentication. It cannot handle user-to-service authentication.

Since:
0.9
Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
UsernamePasswordCredentialsSource(String username, String password)
          Constructor that accepts the username and password for which to construct UsernamePasswordAuthenticationToken's from.
 
Method Summary
 Credentials getCredentials(String serviceEndpoint)
          Returns the SecurityContext which should have the proper credentials to give to any system requiring credentials.
 CredentialsType getSupportedCredentialsType()
          Returns the supported CredentialsType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsernamePasswordCredentialsSource

public UsernamePasswordCredentialsSource(String username,
                                         String password)
Constructor that accepts the username and password for which to construct UsernamePasswordAuthenticationToken's from.

Parameters:
username - the username.
password - the password.
Method Detail

getCredentials

public Credentials getCredentials(String serviceEndpoint)
Description copied from interface: CredentialsSource
Returns the SecurityContext which should have the proper credentials to give to any system requiring credentials. This class has no guarantees what a user will do with the credentials and should thus always return a thread-safe version.

Specified by:
getCredentials in interface CredentialsSource
Returns:
the credentials, or null if credentials could not be obtained.

getSupportedCredentialsType

public CredentialsType getSupportedCredentialsType()
Description copied from interface: CredentialsSource
Returns the supported CredentialsType. This should never be null.

Specified by:
getSupportedCredentialsType in interface CredentialsSource
Returns:
the supported credentials type.


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.