Package org.intermine.web.struts.oauth2
Class DefaultOAuthProvider
- java.lang.Object
-
- org.intermine.web.struts.oauth2.DefaultOAuthProvider
-
- All Implemented Interfaces:
OAuthProvider
public final class DefaultOAuthProvider extends java.lang.Object implements OAuthProvider
A representation of an OAuth provider which is one of the default providers provided for end-users. This list of currently supplied providers currently includes those supplied with the OLTU library.- Author:
- Alex Kalderimis
-
-
Constructor Summary
Constructors Constructor Description DefaultOAuthProvider(java.util.Properties properties, org.apache.oltu.oauth2.common.OAuthProviderType provider)
Construct a new provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClientId()
java.lang.String
getClientSecret()
MessageFormat
getMessageFormat()
java.lang.String
getName()
ResponseType
getResponseType()
java.lang.String
getTokenUrl()
-
-
-
Constructor Detail
-
DefaultOAuthProvider
public DefaultOAuthProvider(java.util.Properties properties, org.apache.oltu.oauth2.common.OAuthProviderType provider)
Construct a new provider.- Parameters:
properties
- The properties where the client-id and client-secret can be looked up.provider
- The OLTU provider configuration.
-
-
Method Detail
-
getTokenUrl
public java.lang.String getTokenUrl()
- Specified by:
getTokenUrl
in interfaceOAuthProvider
- Returns:
- the URL for the token endpoint
-
getMessageFormat
public MessageFormat getMessageFormat()
- Specified by:
getMessageFormat
in interfaceOAuthProvider
- Returns:
- the message format this provider expects.
-
getResponseType
public ResponseType getResponseType()
- Specified by:
getResponseType
in interfaceOAuthProvider
- Returns:
- the format in which this provider responds.
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceOAuthProvider
- Returns:
- the name of the provider
-
getClientId
public java.lang.String getClientId()
- Specified by:
getClientId
in interfaceOAuthProvider
- Returns:
- the configured client id for this provider
-
getClientSecret
public java.lang.String getClientSecret()
- Specified by:
getClientSecret
in interfaceOAuthProvider
- Returns:
- the configured client secret for this provider
-
-