public class DefaultOAuth2ServiceImpl extends Object implements IOAuth2Service
IOAuth2Service| Constructor and Description |
|---|
DefaultOAuth2ServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
authorize(OAuth2Service service,
String code)
Authorize user by given service and code
|
boolean |
register(OAuth2Service service,
String code)
Register user by given service and code
|
OAuth2ServiceContext |
requestAuthorizationUrl(OAuth2Service service,
String secretState)
Request authorization url
|
public OAuth2ServiceContext requestAuthorizationUrl(OAuth2Service service, String secretState)
IOAuth2ServicerequestAuthorizationUrl in interface IOAuth2Serviceservice - service which need use for requestsecretState - secret OAuth2 stateOAuth2ServiceContext context for user loginpublic boolean authorize(OAuth2Service service, String code) throws LoginException
IOAuth2Serviceauthorize in interface IOAuth2Serviceservice - service for authorize usercode - OAuth2 code which was received from OAuth2 serverLoginExceptionpublic boolean register(OAuth2Service service, String code) throws RegistrationException
IOAuth2Serviceregister in interface IOAuth2Serviceservice - service for register usercode - OAuth2 code which was received from OAuth2 serverRegistrationExceptionCopyright © 2020. All rights reserved.