Class OAuthAuthenticationServiceImpl
java.lang.Object
net.datenwerke.rs.oauth.service.oauth.OAuthAuthenticationServiceImpl
- All Implemented Interfaces:
OAuthAuthenticationService
-
Constructor Summary
ConstructorsConstructorDescriptionOAuthAuthenticationServiceImpl(<any> datasinkServiceProvider, <any> historyServiceProvider, <any> serverInfoProvider, <any> hookHandlerServiceProvider, <any> configServiceProvider) -
Method Summary
Modifier and TypeMethodDescriptiongenerateAuthenticationUrl(OAuthAuthenticatable oAuthDatasink) Generates the URL necessary for OAuth2 authentication.voidgenerateRefreshToken(String authenticationCode, OAuthAuthenticatable oAuthDatasink, String redirectUri) Generates and saves an OAuth2 refresh token into the given datasink, which is necessary for allowing the app to access the OAuth2 service in future usage without requiring the user to manually authenticate.Get redirect URI needed for OAuth2-authenticated services.
-
Constructor Details
-
OAuthAuthenticationServiceImpl
public OAuthAuthenticationServiceImpl(<any> datasinkServiceProvider, <any> historyServiceProvider, <any> serverInfoProvider, <any> hookHandlerServiceProvider, <any> configServiceProvider)
-
-
Method Details
-
generateRefreshToken
public void generateRefreshToken(String authenticationCode, OAuthAuthenticatable oAuthDatasink, String redirectUri) throws Exception Description copied from interface:OAuthAuthenticationServiceGenerates and saves an OAuth2 refresh token into the given datasink, which is necessary for allowing the app to access the OAuth2 service in future usage without requiring the user to manually authenticate.- Specified by:
generateRefreshTokenin interfaceOAuthAuthenticationService- Parameters:
authenticationCode- the authentication code generated by the OAuth2 serviceoAuthDatasink- the datasink to save the refresh token toredirectUri- the redirect uri- Throws:
Exception
-
generateAuthenticationUrl
Description copied from interface:OAuthAuthenticationServiceGenerates the URL necessary for OAuth2 authentication.- Specified by:
generateAuthenticationUrlin interfaceOAuthAuthenticationService- Parameters:
oAuthDatasink- the OAuth2 datasink- Returns:
- the authentication URL
-
getRedirectUri
Description copied from interface:OAuthAuthenticationServiceGet redirect URI needed for OAuth2-authenticated services. This redirect URI must be entered into the respective apps in the app-developer administration.- Specified by:
getRedirectUriin interfaceOAuthAuthenticationService- Returns:
- the redirect URI
-