org.surfnet.oaaas.auth.principal
Class UserPassCredentials

java.lang.Object
  extended by org.surfnet.oaaas.auth.principal.UserPassCredentials

public class UserPassCredentials
extends Object

Holder and parser for the username and password from the authentication header.


Constructor Summary
UserPassCredentials(String authorizationHeader)
          Parse the username and password from the authorization header.
UserPassCredentials(String username, String password)
           
 
Method Summary
 String getAuthorizationHeaderValue()
           
 String getPassword()
          Get the password.
 String getUsername()
          Get the username.
 boolean isValid()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserPassCredentials

public UserPassCredentials(String authorizationHeader)
Parse the username and password from the authorization header. If the username and password cannot be found they are set to null.

Parameters:
authorizationHeader - the authorization header

UserPassCredentials

public UserPassCredentials(String username,
                           String password)
Method Detail

isValid

public boolean isValid()

getUsername

public String getUsername()
Get the username.

Returns:
the username or null if the username was not found

getPassword

public String getPassword()
Get the password.

Returns:
the password or null if the password was not found

toString

public String toString()
Overrides:
toString in class Object

getAuthorizationHeaderValue

public String getAuthorizationHeaderValue()


Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.