Interface OAuthAuthenticationService
- All Known Implementing Classes:
DummyOAuthenticationServiceImpl,OAuthAuthenticationServiceImpl
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
public interface OAuthAuthenticationService
-
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.
-
Method Details
-
generateRefreshToken
void generateRefreshToken(String authenticationCode, OAuthAuthenticatable oAuthDatasink, String redirectUri) throws Exception 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.- Parameters:
authenticationCode- the authentication code generated by the OAuth2 serviceoAuthDatasink- the datasink to save the refresh token toredirectUri- the redirect uri- Throws:
Exception
-
generateAuthenticationUrl
Generates the URL necessary for OAuth2 authentication.- Parameters:
oAuthDatasink- the OAuth2 datasink- Returns:
- the authentication URL
-
getRedirectUri
String getRedirectUri()Get redirect URI needed for OAuth2-authenticated services. This redirect URI must be entered into the respective apps in the app-developer administration.- Returns:
- the redirect URI
-