Interface Authenticator
- All Known Implementing Classes:
AbstractOAuth2TokenAuthenticator
,DefaultAuthenticator
,DirectAccessTokenAuthenticator
,JWTAuthenticator
,JWTHS256Authenticator
,JWTRS256Authenticator
,OAuth2TokenAuthorizationCodeAuthenticator
,OAuth2TokenClientCredentialsAuthenticator
,OAuth2TokenJWTAuthenticator
,OAuth2TokenPasswordAuthenticator
,OAuth2TokenRefreshTokenAuthenticator
public interface Authenticator
An Authenticator is an object that might be needed by a connector implementation
in order to obtain some kind of access token (String) required to
authenticate to its destination system (usually via a Driver).
-
Method Summary
Modifier and Type Method Description String
authenticate(ConnectorConfiguration configuration)
Perform all required authentication needed for this connector.default Map<String,String>
getAdditionalAuthenticationHeaders(ConnectorConfiguration configuration)
Define any additional authentication headers needed during authentication.Set<ConnectorProperty>
getRequiredPropertyNames()
Returns the names of the properties for properties that must be present in order for this Authenticator to function.
-
Method Details
-
getRequiredPropertyNames
Set<ConnectorProperty> getRequiredPropertyNames()Returns the names of the properties for properties that must be present in order for this Authenticator to function. This method should return the required property names for any sub-authenticators or key loaders that it uses.- Returns:
- Set containing property names, represented as a set of enum values. Returning null or an empty set is also allowed if there are no properties for this driver.
-
authenticate
String authenticate(ConnectorConfiguration configuration) throws org.identityconnectors.framework.common.exceptions.ConnectorSecurityExceptionPerform all required authentication needed for this connector.- Parameters:
configuration
- The configuration object respective to this connector- Returns:
- String containing an access token or other value produced as a result of authentication. In some implementations this could return a String flag of some kind or null if authenticator has no meaningful output or actual authentication.
- Throws:
org.identityconnectors.framework.common.exceptions.ConnectorSecurityException
- if could not authenticate or permissions was denied
-
getAdditionalAuthenticationHeaders
default Map<String,String> getAdditionalAuthenticationHeaders(ConnectorConfiguration configuration)Define any additional authentication headers needed during authentication. Usually these are HTTP headers.- Parameters:
configuration
- Reference to Configuration to aid implementing authentications setup proper authentication values.- Returns:
- Map containg key/value pairs of additional authentication values.
-