org.gcube.soa3.connector.common.security.impl
Class UserNamePasswordCredentials

java.lang.Object
  extended by org.gcube.soa3.connector.common.security.impl.UserNamePasswordCredentials
All Implemented Interfaces:
Credentials

public class UserNamePasswordCredentials
extends Object
implements Credentials

Username and password credentials

Author:
Ciro Formisano (ENG)

Constructor Summary
UserNamePasswordCredentials(String userName, char[] password)
           
 
Method Summary
 String getAuthenticationString()
          Gets the raw credentialS String if exists, a String representiation of the credentials used otherwise
 String getAuthenticationType()
          Returns "BASIC"
 String getHeaderString()
          Gets the credential string to be set in the header of the message
 void prepareCredentials()
          Prepares the credentials to be sent with the message: if the credentials are string based and should be set in an header, they are returned as a String object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserNamePasswordCredentials

public UserNamePasswordCredentials(String userName,
                                   char[] password)
Method Detail

prepareCredentials

public void prepareCredentials()
Prepares the credentials to be sent with the message: if the credentials are string based and should be set in an header, they are returned as a String object

Specified by:
prepareCredentials in interface Credentials

getAuthenticationType

public String getAuthenticationType()
Returns "BASIC"

Specified by:
getAuthenticationType in interface Credentials
Returns:
the credentials type

getAuthenticationString

public String getAuthenticationString()
Gets the raw credentialS String if exists, a String representiation of the credentials used otherwise

Specified by:
getAuthenticationString in interface Credentials
Returns:
the credentials String

getHeaderString

public String getHeaderString()
Gets the credential string to be set in the header of the message

Specified by:
getHeaderString in interface Credentials
Returns:
the credentials string if it is required to be set in an header, null otherwise


Copyright © 2013. All Rights Reserved.