Package io.milton.resource
Class OAuth2ProviderBean
- java.lang.Object
-
- io.milton.resource.OAuth2ProviderBean
-
- All Implemented Interfaces:
OAuth2Provider
public class OAuth2ProviderBean extends Object implements OAuth2Provider
-
-
Constructor Summary
Constructors Constructor Description OAuth2ProviderBean(String providerId, String location, String clientId, String clientSecret, String redirectUri, String tokenLocation, String profileLocation, Collection scopes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthLocation()This is the URL we will redirect the user to, where they will enter their username and password into the remote application (if required) and authorise our appStringgetClientId()StringgetClientSecret()Collection<String>getPermissionScopes()Returns a list of named permission scopes, such as "email", "profile", etc, which determine what this client is permitted to doStringgetProfileLocation()StringgetProviderId()Identifies the provider to this application, ie 'facebook' or 'twitter' or 'myownserver'StringgetRedirectURI()StringgetTokenLocation()This is the URL we will call direct (server to server) to get an access token from the access code received in the redirect back to our site from the oauth server
-
-
-
Method Detail
-
getAuthLocation
public String getAuthLocation()
Description copied from interface:OAuth2ProviderThis is the URL we will redirect the user to, where they will enter their username and password into the remote application (if required) and authorise our app- Specified by:
getAuthLocationin interfaceOAuth2Provider- Returns:
-
getClientId
public String getClientId()
- Specified by:
getClientIdin interfaceOAuth2Provider
-
getClientSecret
public String getClientSecret()
- Specified by:
getClientSecretin interfaceOAuth2Provider
-
getRedirectURI
public String getRedirectURI()
- Specified by:
getRedirectURIin interfaceOAuth2Provider
-
getTokenLocation
public String getTokenLocation()
Description copied from interface:OAuth2ProviderThis is the URL we will call direct (server to server) to get an access token from the access code received in the redirect back to our site from the oauth server- Specified by:
getTokenLocationin interfaceOAuth2Provider- Returns:
-
getProfileLocation
public String getProfileLocation()
- Specified by:
getProfileLocationin interfaceOAuth2Provider
-
getProviderId
public String getProviderId()
Description copied from interface:OAuth2ProviderIdentifies the provider to this application, ie 'facebook' or 'twitter' or 'myownserver'- Specified by:
getProviderIdin interfaceOAuth2Provider- Returns:
-
getPermissionScopes
public Collection<String> getPermissionScopes()
Description copied from interface:OAuth2ProviderReturns a list of named permission scopes, such as "email", "profile", etc, which determine what this client is permitted to do- Specified by:
getPermissionScopesin interfaceOAuth2Provider- Returns:
-
-