Package com.atlassian.applinks.spi.auth
Interface AuthenticationConfigurationManager
public interface AuthenticationConfigurationManager
Acts as a data store for authentication providers.
- Since:
- 3.0
-
Method Summary
Modifier and TypeMethodDescriptiongetConfiguration(ApplicationId id, Class<? extends AuthenticationProvider> provider) Returns the configuration previously stored for this application/auth pair, ornullwhen no configuration was ever stored.booleanisConfigured(ApplicationId id, Class<? extends AuthenticationProvider> provider) voidregisterProvider(ApplicationId id, Class<? extends AuthenticationProvider> provider, Map<String, String> config) Registers configuration for the specified authentication provider with the given application link.voidunregisterProvider(ApplicationId id, Class<? extends AuthenticationProvider> provider) Removes the configuration for the specified applink/auth-provider combination.
-
Method Details
-
isConfigured
- Parameters:
id- the id of the application link for which to test authentication configuration.provider- the type of a AppLinks authentication provider (e.g.BasicAuthenticationProvider)- Returns:
trueif the specified authentication provider is configured for use with the specified application link,falseotherwise.
-
registerProvider
void registerProvider(ApplicationId id, Class<? extends AuthenticationProvider> provider, Map<String, String> config) Registers configuration for the specified authentication provider with the given application link.If existing configuration for this applink/auth-provider combination already exists, it will be replaced by the new configuration.
- Parameters:
id- the id of the application link for which to configure authentication information.provider- the type of a AppLinks authentication provider (e.g.BasicAuthenticationProvider)config- the configuration for outbound requests to the specified application with the given authentication provider. Must not benull. Keys do not need to be prefixed.
-
unregisterProvider
Removes the configuration for the specified applink/auth-provider combination. After this,isConfigured(com.atlassian.applinks.api.ApplicationId, Class)will returnfalse. Does nothing if this applink/auth-provider was never registered.- Parameters:
id- the id of the application link for which to remove authentication information.provider- the type of a AppLinks authentication provider (e.g.BasicAuthenticationProvider)
-
getConfiguration
Map<String,String> getConfiguration(ApplicationId id, Class<? extends AuthenticationProvider> provider) Returns the configuration previously stored for this application/auth pair, ornullwhen no configuration was ever stored.- Parameters:
id- the id of the application link for which to retrieve authentication information.provider- the type of a AppLinks authentication provider (e.g.BasicAuthenticationProvider)- Returns:
- the configuration previously stored for this application/auth
pair, or
nullwhen no configuration was ever stored.
-