|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.security.server.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[] |
getCurrentAcceptingProviders()
Returns names of the current security providers for incoming requests or null if none is set as current. |
abstract java.lang.String |
getCurrentInitiatingProvider()
Returns current security provider name for outgoing calls or null if none is set as current. |
static Current |
getInstance()
Returns default instance of Current class. |
abstract ServerSecurityProvider |
getProvider(java.lang.String name)
Returns instance of the ServerSecurityProvider 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 ReceivedCredentials |
getReceivedCredentials()
Returns credentials of the caller |
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 |
resetCredentials(java.util.Map parameters)
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 |
setCurrentAcceptingProviders(java.lang.String[] name)
Sets given provider as the current provider for accepting requests. |
abstract void |
setCurrentAcceptingProviders(java.lang.String[] name,
java.util.Map parameters)
Sets given provider as the current provider for accepting requests. |
abstract void |
setCurrentInitiatingProvider(java.lang.String name)
Sets given provider as the current provider for initiating new calls to other Web Services. |
abstract void |
setCurrentInitiatingProvider(java.lang.String name,
java.util.Map parameters)
Sets given provider as the current provider for initiating new calls to other Web Services. |
abstract void |
setCurrentProvider(java.lang.String name)
Sets given provider as the current provider for both initiating and accepting sides. |
abstract void |
setReceivedCredentials(ReceivedCredentials creds)
Sets received credentials for this call. |
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.
name
- name of the provider for which the properties
have to returned
java.security.NoSuchProviderException
- when given provider cannot be foundpublic abstract void setCurrentProvider(java.lang.String name) throws java.security.NoSuchProviderException
After successfull call to this method all new incoming and outgoing calls will use this provider as a mechanism for authentication and message protection.
name
- name of the provider to be set as the current one
java.security.NoSuchProviderException
- when given provider cannot be foundpublic abstract java.lang.String getCurrentInitiatingProvider()
null
if none is set as current.
public abstract void setCurrentInitiatingProvider(java.lang.String name) throws java.security.NoSuchProviderException
After successfull call to this method all new outgoing calls will use this provider as a mechanism for authentication and messsage protection.
name
- name of the provider to be set as the current one
for outgoing messages
java.security.NoSuchProviderException
- when given provider cannot be foundpublic abstract void setCurrentInitiatingProvider(java.lang.String name, java.util.Map parameters) throws java.security.NoSuchProviderException
After successfull call to this method all new outgoing calls will use this provider as a mechanism for authentication and messsage protection.
name
- name of the provider to be set as the current one
for outgoing messagesparameters
- additional parameters for the security provider
java.security.NoSuchProviderException
- when given provider cannot be foundpublic abstract java.lang.String[] getCurrentAcceptingProviders()
null
if none is set as current.
public abstract void setCurrentAcceptingProviders(java.lang.String[] name) throws java.security.NoSuchProviderException
After successfull call to this method all new incoming requests will use this provider as a mechanism for authentication and messsage protection.
name
- name of the provider to be set as the current one
for incoming messages
java.security.NoSuchProviderException
- when given provider cannot be foundpublic abstract void setCurrentAcceptingProviders(java.lang.String[] name, java.util.Map parameters) throws java.security.NoSuchProviderException
After successfull call to this method all new incoming requests will use this provider as a mechanism for authentication and messsage protection.
name
- name of the provider to be set as the current one
for incoming messagesparameters
- additionall parameters for the security providers
java.security.NoSuchProviderException
- when given provider cannot be foundpublic abstract ServerSecurityProvider getProvider(java.lang.String name) throws java.security.NoSuchProviderException
ServerSecurityProvider
interface
for given security provider name.
name
- name of the provider to be returned
java.security.NoSuchProviderException
- when given provider cannot be foundpublic 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
- when given provider cannot be foundpublic 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
- additionall parameters for the security providerspublic abstract void resetCredentials()
public abstract void resetCredentials(java.util.Map parameters)
parameters
- additionall parameters for the security providerspublic abstract ReceivedCredentials getReceivedCredentials()
public abstract void setReceivedCredentials(ReceivedCredentials creds)
This method should be used from the Security Provider implementation when the client is authenticated to the server.
This method must be called after the Web Service contexts are initialized (i.e. after the call is processed by WASP Dispatcher). Generally it means that this method can be used from the interceptors and header processors but not for example by transport drivers.
creds
- ReceivedCredentials
instance to be set
for this call.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |