eu.emi.client.security
Class AbstractSecurityConfigurationImpl

java.lang.Object
  extended by eu.emi.client.security.AbstractSecurityConfigurationImpl
All Implemented Interfaces:
IAuthenticationConfiguration, ISecurityConfiguration, Cloneable

public abstract class AbstractSecurityConfigurationImpl
extends Object
implements IAuthenticationConfiguration

Do nothing implementation of security configuration. Useful for subclassing.

Author:
K. Benedyczak

Constructor Summary
AbstractSecurityConfigurationImpl()
           
 
Method Summary
abstract  IAuthenticationConfiguration clone()
          Cloning support is mandatory
 boolean doHttpAuthn()
          Returns true if HTTP BASIC Auth should be used.
 boolean doSSLAuthn()
          Returns true if the client-side TLS authentication should be done.
 String getHttpPassword()
          Returns HTTP BASIC Auth user's password.
 String getHttpUser()
          Returns HTTP BASIC Auth user.
 String getKeystore()
          Returns keystore location.
 String getKeystoreAlias()
          Returns key alias in keystore.
 String getKeystoreKeyPassword()
          Returns key password in keystore.
 String getKeystorePassword()
          Returns keystore password.
 String getKeystoreType()
          Returns keystore type.
 SSLContext getSSLContext()
          This method can return initialized SSLContext or null.
 String getTruststore()
          Returns truststore location.
 String getTruststorePassword()
          Returns truststore password.
 String getTruststoreType()
          Returns truststore type.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSecurityConfigurationImpl

public AbstractSecurityConfigurationImpl()
Method Detail

doHttpAuthn

public boolean doHttpAuthn()
Description copied from interface: IAuthenticationConfiguration
Returns true if HTTP BASIC Auth should be used.

Specified by:
doHttpAuthn in interface IAuthenticationConfiguration
Returns:

doSSLAuthn

public boolean doSSLAuthn()
Description copied from interface: IAuthenticationConfiguration
Returns true if the client-side TLS authentication should be done. If false then all (inherited from the super interface ISecurityConfiguration) getKeystore* methods are not used at all.

Specified by:
doSSLAuthn in interface IAuthenticationConfiguration
Returns:

getHttpPassword

public String getHttpPassword()
Description copied from interface: IAuthenticationConfiguration
Returns HTTP BASIC Auth user's password. Required if doHttpAuthn is true.

Specified by:
getHttpPassword in interface IAuthenticationConfiguration
Returns:

getHttpUser

public String getHttpUser()
Description copied from interface: IAuthenticationConfiguration
Returns HTTP BASIC Auth user. Required if doHttpAuthn is true.

Specified by:
getHttpUser in interface IAuthenticationConfiguration
Returns:

getKeystore

public String getKeystore()
Description copied from interface: ISecurityConfiguration
Returns keystore location.

Specified by:
getKeystore in interface ISecurityConfiguration
Returns:

getKeystoreAlias

public String getKeystoreAlias()
Description copied from interface: ISecurityConfiguration
Returns key alias in keystore.

Specified by:
getKeystoreAlias in interface ISecurityConfiguration
Returns:

getKeystoreKeyPassword

public String getKeystoreKeyPassword()
Description copied from interface: ISecurityConfiguration
Returns key password in keystore.

Specified by:
getKeystoreKeyPassword in interface ISecurityConfiguration
Returns:

getKeystorePassword

public String getKeystorePassword()
Description copied from interface: ISecurityConfiguration
Returns keystore password.

Specified by:
getKeystorePassword in interface ISecurityConfiguration
Returns:

getKeystoreType

public String getKeystoreType()
Description copied from interface: ISecurityConfiguration
Returns keystore type.

Specified by:
getKeystoreType in interface ISecurityConfiguration
Returns:

getTruststore

public String getTruststore()
Description copied from interface: IAuthenticationConfiguration
Returns truststore location. If this method returns null then (for SSL connections) client will trust ANY server certificate.

Specified by:
getTruststore in interface IAuthenticationConfiguration
Returns:

getTruststorePassword

public String getTruststorePassword()
Description copied from interface: IAuthenticationConfiguration
Returns truststore password.

Specified by:
getTruststorePassword in interface IAuthenticationConfiguration
Returns:

getTruststoreType

public String getTruststoreType()
Description copied from interface: IAuthenticationConfiguration
Returns truststore type.

Specified by:
getTruststoreType in interface IAuthenticationConfiguration
Returns:

getSSLContext

public SSLContext getSSLContext()
Description copied from interface: IAuthenticationConfiguration
This method can return initialized SSLContext or null. If null is returned then SSLContext will be created by this library itself using the data from the other methods defined in this interface. If this method returns non-null value then most of the methods in this interface are not used (only HTTP related are still used).

Specified by:
getSSLContext in interface IAuthenticationConfiguration
Returns:
initialized SSL context.

clone

public abstract IAuthenticationConfiguration clone()
Description copied from interface: IAuthenticationConfiguration
Cloning support is mandatory

Specified by:
clone in interface IAuthenticationConfiguration
Specified by:
clone in interface ISecurityConfiguration
Overrides:
clone in class Object


Copyright © 2012 EMI. All Rights Reserved.