Package com.adobe.granite.auth.oauth
Interface ProviderExtension
-
public interface ProviderExtensionThis interface is intended to be implemented by an application which wants to customize the behavior of aProviderimplementation. A ProviderExtension instance is bind to all specificProviders supporting the provider extension and for which Provider#getId equals ProviderExtension#getId. EachProvidercan 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.StringgetId()Unique ID for this provider extension, used to bind aProviderwith the current ProviderExtension instance.java.lang.StringgetUserFolderPath(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.StringmapUserId(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.voidonUserCreate(User user)Called after theProvider.onUserCreate(org.apache.jackrabbit.api.security.user.User)of the referencedProviderinstance is called.voidonUserUpdate(User user)Called after theProvider.onUserUpdate(org.apache.jackrabbit.api.security.user.User)of the referencedProviderinstance is called.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Unique ID for this provider extension, used to bind aProviderwith 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
nullin 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
nullin 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 referencedProviderinstance 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 referencedProviderinstance is called.- Parameters:
user- the user which has been created
-
-