public abstract class AbstractPlugIn extends Object implements AuthenticationPlugIn<Credential>, AuthorizationPlugIn, PlugInConfigurationSupport
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
configuration |
protected String[] |
roles |
protected Map<String,Object> |
sharedState |
| Constructor and Description |
|---|
AbstractPlugIn() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(Map<String,String> configuration,
Map<String,Object> sharedState)
Initialisation method called before any request to pass in plug-in configuration and a shared state map to share state
between multiple plug-ins handling the same request.
|
Identity<Credential> |
loadIdentity(String userName,
String realm)
Load the identity for the given username and realm.
|
String[] |
loadRoles(String userName,
String realm)
Load and return a list of the roles for the given username and realm.
|
protected String[] roles
public void init(Map<String,String> configuration, Map<String,Object> sharedState) throws IOException
PlugInConfigurationSupportinit in interface PlugInConfigurationSupportconfiguration - - The defined configuration for this plug-in. This Map is shared between all instances of the
plug-in and is not modifiable.sharedState - - A Map of shared state to be shared by all plug-ins handling the same request.IOException - If the plug-in can not complete the initialisation successfully.PlugInConfigurationSupport.init(java.util.Map, java.util.Map)public Identity<Credential> loadIdentity(String userName, String realm) throws IOException
AuthenticationPlugInloadIdentity in interface AuthenticationPlugIn<Credential>userName - - The username supplied by the user.realm - - Either the realm supplied by the user or the name of the realm this plug-in is executing within.IOException - - If there is any problem loading the identity or if the identity is not found.AuthenticationPlugIn.loadIdentity(java.lang.String, java.lang.String)public String[] loadRoles(String userName, String realm) throws IOException
AuthorizationPlugInloadRoles in interface AuthorizationPlugInuserName - - The username supplied by the user.realm - - Either the realm supplied by the user or the name of the realm this plug-in is executing within.IOException - - If an error occurs loading the roles or if the identity can not be found.AuthorizationPlugIn.loadRoles(java.lang.String, java.lang.String)Copyright © 2015 JBoss by Red Hat. All rights reserved.