Package com.adobe.granite.auth.oauth
Interface ProviderExtension
-
public interface ProviderExtension
This interface is intended to be implemented by an application which wants to customize the behavior of aProvider
implementation. A ProviderExtension instance is bind to all specificProvider
s supporting the provider extension and for which Provider#getId equals ProviderExtension#getId. EachProvider
can be bind to either 0 or 1 ProviderExtension at any given time and in case the condition above holds for more than one ProviderExtension, then the instance with the highest service ranking is selected.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getId()
Unique ID for this provider extension, used to bind aProvider
with the current ProviderExtension instance.java.lang.String
getUserFolderPath(java.lang.String userId, java.lang.String clientId, java.util.Map<java.lang.String,java.lang.Object> props)
Return the node path where the user should be createdjava.lang.String
mapUserId(java.lang.String userId, java.util.Map<java.lang.String,java.lang.Object> props)
Map the provider's user identifier to a unique CRX user identifier.void
onUserCreate(User user)
Called after theProvider.onUserCreate(org.apache.jackrabbit.api.security.user.User)
of the referencedProvider
instance is called.void
onUserUpdate(User user)
Called after theProvider.onUserUpdate(org.apache.jackrabbit.api.security.user.User)
of the referencedProvider
instance is called.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Unique ID for this provider extension, used to bind aProvider
with the current ProviderExtension instance.- Returns:
- the provider extension identifier
-
mapUserId
java.lang.String mapUserId(java.lang.String userId, java.util.Map<java.lang.String,java.lang.Object> props)
Map the provider's user identifier to a unique CRX user identifier.- Parameters:
userId
- provider's user identifierprops
- map of all provider's properties for the user identifier- Returns:
- the user identifier or
null
in order to leave the implementation to the referencedProvider
- See Also:
Provider.mapUserId(String, java.util.Map)
-
getUserFolderPath
java.lang.String getUserFolderPath(java.lang.String userId, java.lang.String clientId, java.util.Map<java.lang.String,java.lang.Object> props)
Return the node path where the user should be created- Parameters:
userId
- provider's user identifierclientId
- client identifierprops
- map of all provider's properties for this user identifier- Returns:
- relative path to store this user within /home/users or
null
in order to leave the implementation to the referencedProvider
-
onUserUpdate
void onUserUpdate(User user)
Called after theProvider.onUserUpdate(org.apache.jackrabbit.api.security.user.User)
of the referencedProvider
instance is called.- Parameters:
user
- the user which has been updated- See Also:
Provider.onUserUpdate(org.apache.jackrabbit.api.security.user.User)
-
onUserCreate
void onUserCreate(User user)
Called after theProvider.onUserCreate(org.apache.jackrabbit.api.security.user.User)
of the referencedProvider
instance is called.- Parameters:
user
- the user which has been created
-
-