|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.security.client.Current
This class makes accessible environment specific interfaces such as
PrinicipalAuthenticator
, current Credentials
,
etc.
Constructor Summary | |
Current()
|
Method Summary | |
abstract PrincipalAuthenticator |
getAuthenticator()
Returns default instance of PrincipalAuthenticator interface, which is used for authentication of principals. |
abstract PrincipalAuthenticator |
getAuthenticator(java.lang.String provider)
Returns instance of PrincipalAuthenticator interface for given provider type. |
abstract Credentials[] |
getCredentials()
Returns current credentials in use or NULL if none has been set. |
abstract java.lang.String |
getCurrentProvider()
Returns current security provider name or null
if none is set as current. |
static Current |
getInstance()
Returns default instance of Current class. |
abstract ClientSecurityProvider |
getProvider(java.lang.String name)
Returns instance of the ClientSecurityProvider interface
for given security provider name. |
abstract java.util.Properties |
getProviderProperties(java.lang.String name)
Returns properties associated with given security provider. |
abstract java.lang.String[] |
getProviders()
Returns array of available providers which can be used as the provider parameter in the getAuthenticator(String provider) method. |
abstract void |
registerProvider(java.lang.String name,
java.lang.String implClassName)
Registers PrincipalAuthenticator provider implementation
with given name. |
abstract void |
resetCredentials()
Removes all credentials from the current list. |
abstract void |
setCredentials(Credentials[] creds)
Adds given array of credentials to the current ones. |
abstract void |
setCredentials(Credentials[] creds,
java.util.Map parameters)
Adds given array of credentials to the current ones. |
abstract void |
setCurrentProvider(java.lang.String name)
Sets given provider as the current provider. |
abstract void |
setCurrentProvider(java.lang.String name,
java.util.Map parameters)
Sets given provider as the current provider. |
abstract void |
setCurrentThreadCredentials(Credentials[] creds)
This method sets the credentials for current thread overriding the credentials, which were set using setCredentials() method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Current()
Method Detail |
public static Current getInstance()
public abstract java.lang.String[] getProviders()
getAuthenticator(String provider)
method.
public abstract void registerProvider(java.lang.String name, java.lang.String implClassName)
PrincipalAuthenticator
provider implementation
with given name. The implementation class must implement the
org.idoox.security.PrincipalAuthenticatorSPI
interface.
name
- name of the providerimplClassName
- name of the implementation classpublic abstract java.util.Properties getProviderProperties(java.lang.String name) throws java.security.NoSuchProviderException
The properties contain some general characteristics of the security mechanism implemented by given provider, such as default quality of protection, description, etc.
java.security.NoSuchProviderException
public abstract java.lang.String getCurrentProvider()
null
if none is set as current.
public abstract void setCurrentProvider(java.lang.String name) throws java.security.NoSuchProviderException
name
- name of the provider to be set as the current one
java.security.NoSuchProviderException
public abstract void setCurrentProvider(java.lang.String name, java.util.Map parameters) throws java.security.NoSuchProviderException
name
- name of the provider to be set as the current oneparameters
- additional parameters for the security provider
java.security.NoSuchProviderException
public abstract ClientSecurityProvider getProvider(java.lang.String name) throws java.security.NoSuchProviderException
ClientSecurityProvider
interface
for given security provider name.
java.security.NoSuchProviderException
public abstract PrincipalAuthenticator getAuthenticator()
public abstract PrincipalAuthenticator getAuthenticator(java.lang.String provider) throws java.security.NoSuchProviderException
provider
- name of the provider of the PrincipalAuthenticator
java.security.NoSuchProviderException
public abstract Credentials[] getCredentials()
public abstract void setCredentials(Credentials[] creds)
creds
- credentials to be set as currentpublic abstract void setCredentials(Credentials[] creds, java.util.Map parameters)
creds
- credentials to be set as currentparameters
- additional parameters for the security providerpublic abstract void setCurrentThreadCredentials(Credentials[] creds)
setCredentials()
method.
This is usefull, if the client needs to override current credentials
for particular call, but does not want to disturb other client threads.
creds
- credentials to be set as current thread currentpublic abstract void resetCredentials()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |