Package org.wso2.auth0.client
Class Auth0OAuthClient
java.lang.Object
org.wso2.carbon.apimgt.impl.AbstractKeyManager
org.wso2.auth0.client.Auth0OAuthClient
- All Implemented Interfaces:
org.wso2.carbon.apimgt.api.model.KeyManager
public class Auth0OAuthClient
extends org.wso2.carbon.apimgt.impl.AbstractKeyManager
Auth0 Client Implementation.
-
Field Summary
Fields inherited from class org.wso2.carbon.apimgt.impl.AbstractKeyManager
configuration, tenantDomain -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleToken(String accessToken) org.wso2.carbon.apimgt.api.model.OAuthApplicationInfocreateApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest) voiddeleteApplication(String clientID) voidvoidvoidorg.wso2.carbon.apimgt.api.model.AccessTokenInfostatic StringgetEncodedCredentials(String clientId, String clientSecret) Returns base64 encoded credentials.org.wso2.carbon.apimgt.api.model.KeyManagerConfigurationorg.wso2.carbon.apimgt.api.model.AccessTokenInfogetNewApplicationAccessToken(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest) getNewApplicationConsumerSecret(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest) org.wso2.carbon.apimgt.api.model.ScopegetScopesForAPIS(String apiIdsString) org.wso2.carbon.apimgt.api.model.AccessTokenInfoThis operation is not supported by Auth0getType()booleanvoidloadConfiguration(org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration keyManagerConfiguration) org.wso2.carbon.apimgt.api.model.OAuthApplicationInfomapOAuthApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest) booleanregisterNewResource(org.wso2.carbon.apimgt.api.model.API api, Map map) voidregisterScope(org.wso2.carbon.apimgt.api.model.Scope scope) org.wso2.carbon.apimgt.api.model.OAuthApplicationInforetrieveApplication(String clientID) org.wso2.carbon.apimgt.api.model.OAuthApplicationInfoupdateApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest) booleanupdateRegisteredResource(org.wso2.carbon.apimgt.api.model.API api, Map map) voidupdateScope(org.wso2.carbon.apimgt.api.model.Scope scope) Methods inherited from class org.wso2.carbon.apimgt.impl.AbstractKeyManager
buildAccessTokenRequestFromJSON, buildAccessTokenRequestFromOAuthApp, buildFromJSON, handleException, setTenantDomain, validateOAuthAppCreationPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wso2.carbon.apimgt.api.model.KeyManager
attachResourceScopes, buildFromJSON, detachResourceScopes, getUserClaims, updateApplicationOwner, updateResourceScopes, validateScopes
-
Constructor Details
-
Auth0OAuthClient
public Auth0OAuthClient()
-
-
Method Details
-
getEncodedCredentials
public static String getEncodedCredentials(String clientId, String clientSecret) throws org.wso2.carbon.apimgt.api.APIManagementException Returns base64 encoded credentials.- Parameters:
clientId- clientId of the oauth client.clientSecret- clientSecret of the oauth clients.- Returns:
- String base64 encode string.
- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
createApplication
public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo createApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
updateApplication
public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo updateApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
deleteApplication
public void deleteApplication(String clientID) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
retrieveApplication
public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo retrieveApplication(String clientID) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getNewApplicationAccessToken
public org.wso2.carbon.apimgt.api.model.AccessTokenInfo getNewApplicationAccessToken(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getNewApplicationConsumerSecret
public String getNewApplicationConsumerSecret(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getTokenMetaData
public org.wso2.carbon.apimgt.api.model.AccessTokenInfo getTokenMetaData(String s) throws org.wso2.carbon.apimgt.api.APIManagementException This operation is not supported by Auth0- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getKeyManagerConfiguration
public org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration getKeyManagerConfiguration() throws org.wso2.carbon.apimgt.api.APIManagementException- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
mapOAuthApplication
public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo mapOAuthApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
loadConfiguration
public void loadConfiguration(org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration keyManagerConfiguration) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
registerNewResource
public boolean registerNewResource(org.wso2.carbon.apimgt.api.model.API api, Map map) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getResourceByApiId
- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
updateRegisteredResource
public boolean updateRegisteredResource(org.wso2.carbon.apimgt.api.model.API api, Map map) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
deleteRegisteredResourceByAPIId
public void deleteRegisteredResourceByAPIId(String s) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
deleteMappedApplication
public void deleteMappedApplication(String s) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getActiveTokensByConsumerKey
public Set<String> getActiveTokensByConsumerKey(String s) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getAccessTokenByConsumerKey
public org.wso2.carbon.apimgt.api.model.AccessTokenInfo getAccessTokenByConsumerKey(String s) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
canHandleToken
public boolean canHandleToken(String accessToken) throws org.wso2.carbon.apimgt.api.APIManagementException - Specified by:
canHandleTokenin interfaceorg.wso2.carbon.apimgt.api.model.KeyManager- Overrides:
canHandleTokenin classorg.wso2.carbon.apimgt.impl.AbstractKeyManager- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getScopesForAPIS
public Map<String,Set<org.wso2.carbon.apimgt.api.model.Scope>> getScopesForAPIS(String apiIdsString) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
registerScope
public void registerScope(org.wso2.carbon.apimgt.api.model.Scope scope) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getScopeByName
public org.wso2.carbon.apimgt.api.model.Scope getScopeByName(String s) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getAllScopes
public Map<String,org.wso2.carbon.apimgt.api.model.Scope> getAllScopes() throws org.wso2.carbon.apimgt.api.APIManagementException- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
deleteScope
- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
updateScope
public void updateScope(org.wso2.carbon.apimgt.api.model.Scope scope) throws org.wso2.carbon.apimgt.api.APIManagementException - Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
isScopeExists
- Throws:
org.wso2.carbon.apimgt.api.APIManagementException
-
getType
-