public interface SecurityManager
extends org.mule.runtime.api.lifecycle.Initialisable
SecurityManager is responsible for managing one or more SecurityProviders.| Modifier and Type | Method and Description |
|---|---|
void |
addEncryptionStrategy(EncryptionStrategy strategy)
Adds the
EncryptionStrategy to the ones available from this SecurityManager |
void |
addProvider(SecurityProvider provider)
Adds a
SecurityProvider to the set of available providers for authentication. |
org.mule.runtime.api.security.Authentication |
authenticate(org.mule.runtime.api.security.Authentication authentication)
Performs the authentication of a security request using one of the available
SecurityProviders |
SecurityContext |
createSecurityContext(org.mule.runtime.api.security.Authentication authentication)
Uses one of the available
SecurityProviders that SecurityProvider.supports(java.lang.Class<?>)
the given Authentication to create a new security context. |
Collection<EncryptionStrategy> |
getEncryptionStrategies() |
EncryptionStrategy |
getEncryptionStrategy(String name) |
SecurityProvider |
getProvider(String name) |
Collection<SecurityProvider> |
getProviders() |
EncryptionStrategy |
removeEncryptionStrategy(String name)
|
SecurityProvider |
removeProvider(String name)
Removes the
SecurityProvider with the given name from the pool of managed SecurityProviders |
void |
setEncryptionStrategies(Collection<EncryptionStrategy> strategies)
|
void |
setProviders(Collection<SecurityProvider> providers)
Sets the available
SecurityProviders for authentication. |
org.mule.runtime.api.security.Authentication authenticate(org.mule.runtime.api.security.Authentication authentication)
throws org.mule.runtime.api.security.SecurityException,
org.mule.runtime.api.security.SecurityProviderNotFoundException
SecurityProvidersauthentication - The Authentication requestorg.mule.runtime.api.security.SecurityException - In case authentication failsorg.mule.runtime.api.security.SecurityProviderNotFoundExceptionSecurityProvider.authenticate(Authentication),
Authentication.isAuthenticated()void addProvider(SecurityProvider provider)
SecurityProvider to the set of available providers for authentication.provider - the new SecurityProviderSecurityProvider getProvider(String name)
SecurityProvider managed by this SecurityManager with the given name
or null if none was foundNamedObject.getName()SecurityProvider removeProvider(String name)
SecurityProvider with the given name from the pool of managed SecurityProvidersname - the NamedObject.getName() to removeSecurityProvider with the given name, or
null if none was foundCollection<SecurityProvider> getProviders()
SecurityProviders managed by this SecurityManagervoid setProviders(Collection<SecurityProvider> providers)
SecurityProviders for authentication.providers - the providers available for this SecurityManagerSecurityContext createSecurityContext(org.mule.runtime.api.security.Authentication authentication) throws org.mule.runtime.api.security.UnknownAuthenticationTypeException
SecurityProviders that SecurityProvider.supports(java.lang.Class<?>)
the given Authentication to create a new security context.authentication - the Authentication used to create the new SecurityContextSecurityContext created by the SecurityProvider with the given authenticationorg.mule.runtime.api.security.UnknownAuthenticationTypeException - if no SecurityProvider is found that SecurityProvider.supports(java.lang.Class<?>)
the given authenticationEncryptionStrategy getEncryptionStrategy(String name)
name - the name of the EncryptionStrategy
that needs to be retrieved.EncryptionStrategy with the given name, from the ones available
in this SecurityManagervoid addEncryptionStrategy(EncryptionStrategy strategy)
EncryptionStrategy to the ones available from this SecurityManagerstrategy - the EncryptionStrategy to be addedEncryptionStrategy removeEncryptionStrategy(String name)
name - the NamedObject.getName() to removeEncryptionStrategy with the given name, or null if none was foundCollection<EncryptionStrategy> getEncryptionStrategies()
EncryptionStrategys managed by this SecurityManagervoid setEncryptionStrategies(Collection<EncryptionStrategy> strategies)
strategies - the prstrategiesoviders available for this EncryptionStrategyCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.