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.
  • 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

      public Map getResourceByApiId(String s) throws org.wso2.carbon.apimgt.api.APIManagementException
      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:
      canHandleToken in interface org.wso2.carbon.apimgt.api.model.KeyManager
      Overrides:
      canHandleToken in class org.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

      public void deleteScope(String s) throws org.wso2.carbon.apimgt.api.APIManagementException
      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

      public boolean isScopeExists(String s) throws org.wso2.carbon.apimgt.api.APIManagementException
      Throws:
      org.wso2.carbon.apimgt.api.APIManagementException
    • getType

      public String getType()