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

java.lang.Object
  extended by org.gcube.soa3.connector.common.security.impl.X509TLSCredentials
All Implemented Interfaces:
Credentials
Direct Known Subclasses:
X509CombinedCredentials

public class X509TLSCredentials
extends Object
implements Credentials

TLS X509 Credentials

Author:
Ciro Formisano (ENG)

Constructor Summary
X509TLSCredentials()
           
X509TLSCredentials(String certFile, String keyFile, char[] keyPassword, String trustDir, String trustExt)
           
 
Method Summary
 void disposeCredentials()
          Disposes the credentials making them unusable
 String getAuthenticationString()
          Gets the raw credentialS String if exists, a String representiation of the credentials used otherwise
 String getAuthenticationType()
          Returns "X509TLS"
 String getHeaderString()
          Gets the credential string to be set in the header of the message
 boolean isPrepared()
          
static void main(String[] args)
           
 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

X509TLSCredentials

public X509TLSCredentials()

X509TLSCredentials

public X509TLSCredentials(String certFile,
                          String keyFile,
                          char[] keyPassword,
                          String trustDir,
                          String trustExt)
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 "X509TLS"

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

main

public static void main(String[] args)

disposeCredentials

public void disposeCredentials()
Description copied from interface: Credentials
Disposes the credentials making them unusable

Specified by:
disposeCredentials in interface Credentials

isPrepared

public boolean isPrepared()

Specified by:
isPrepared in interface Credentials
Returns:
true if the credentials have been correctly prepared


Copyright © 2013. All Rights Reserved.