public interface OrgModelExtension
An extension provides transparent authentication. A password (or other means
of authentication) does not need to be in the organisational model. When
authenticating, the requests are forwarded to the org model extension.
The org model extension usually synchronises relevant parts of the model.
This can either be regularly and/or on request. At least the unique
identifier of the entity in the external model is required. This already
suffices since further attributes can be demanded if required. Attributes can
even be written into the external model thus allowing for highly transparent
integration since all attributes seem to reside in the same org model.
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticate(java.lang.String agentName,
java.lang.String method,
byte[] authenticationData,
AFCallbackHandler callbackHandler)
Authenticates the designated agent by the corresponding name with the
designated authentication method providing the authentication
method-specific data.
|
int |
getAuthenticationPriority()
Gets the priority this org model extension has relative to the other org
model extensions regarding authentication.
|
java.util.Map<java.lang.String,java.lang.String> |
getEntityAttributes(java.lang.String uid,
java.lang.String... attributes)
Gets the designated attributes for the entity uniquely identified via the
designated
uid. |
java.lang.String |
getId()
Gets the unique ID of the org model extension.
|
void |
setEntityAttributes(java.lang.String uid,
java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the designated attributes for the entity uniquely identified via the
designated
uid. |
void |
shutdown()
Shuts the org model extension down, for instance a synchronisation service.
|
void |
start()
Starts the org model extension, for instance a synchronisation service.
|
java.util.concurrent.Future<java.lang.Boolean> |
startSynchronisation(SessionToken session)
Starts a synchronisation manually for the org model data of this extension.
|
void start()
throws AbortServiceException
AbortServiceException - If there are problems starting the org model
extension, an AbortServiceException will be thrown.void shutdown()
java.lang.String getId()
int getAuthenticationPriority()
Priorities below 0 will be ignored.
boolean authenticate(java.lang.String agentName,
java.lang.String method,
byte[] authenticationData,
AFCallbackHandler callbackHandler)
throws AuthenticationException
AuthMethod. The designated callback handler allows the used
authentication method to request additional data while authenticating. For
how to use this refer to
CallbackHandler. For
the used method refer to the corresponding authentication method.
If the authentication with the designated data at this org model extension
is successful, true will be returned. If the data is wrong,
the user is unknown or generally the user cannot be authenticated,
false will be returned. If there are problems authenticating,
e.g. the authentication method is not supported, an
AuthenticationException will be thrown.
agentName - The unique name of the agent to authenticate. This must
not be null nor the empty string.method - The authentication method to use for authentication. This
must not be null nor the empty string.authenticationData - The data required by the designated
authentication method. Depending on the authentication method this
may be null or empty.callbackHandler - A handler for callbacks allowing the used
authentication method to request further data. This may be
null in case no callbacks are required.AuthenticationException - If there are problems authenticating, e.g.
the authentication method is not supported, an
AuthenticationException will be thrown.java.util.Map<java.lang.String,java.lang.String> getEntityAttributes(java.lang.String uid,
java.lang.String... attributes)
uid. If the entity cannot be determined, an empty
map will be returned. If one of the designated attributes does not exist,
it will not be in the returned map. All of the designated attributes that
exist in the external org model will be in the returned map whereas the
attribute name is the key and the attribute value the corresponding map
entry value.uid - The ID uniquely identifying an entity in the external org model.attributes - The name of the attributes of the entity identified by
the designated ID. Use null to retrieve all
attributes of the designated entity.null if the designated entity does not exist,
otherwise the values of the designated attributes indexed by the
attribute names. Attributes which do not exist will not be in this
map.void setEntityAttributes(java.lang.String uid,
java.util.Map<java.lang.String,java.lang.String> attributes)
uid. If the entity cannot be determined, one of the
attributes does not exist or one of the designated attributes has a wrong
value, an OrgModelException will be thrown. The designated
attributes (map key) have to be set to the corresponding values (map entry
value). If a value in the map is null, the corresponding attribute will be
removed.uid - The ID uniquely identifying an entity in the external org model.attributes - The names of the attributes which to set and the
corresponding new values.OrgModelException - If the
designated entity cannot be determined, one of the designated
attributes does not exist or one of the designated attributes has
a wrong value, an OrgModelException will be thrown.java.util.concurrent.Future<java.lang.Boolean> startSynchronisation(SessionToken session)
session - The session which is used to check for access rights on this
method.null
shall be returned.