public class OktaOAuthClient
extends org.wso2.carbon.apimgt.impl.AbstractKeyManager
| Constructor and Description |
|---|
OktaOAuthClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
attachResourceScopes(org.wso2.carbon.apimgt.api.model.API api,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> uriTemplates) |
org.wso2.carbon.apimgt.api.model.AccessTokenRequest |
buildAccessTokenRequestFromOAuthApp(org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo oAuthApplication,
org.wso2.carbon.apimgt.api.model.AccessTokenRequest tokenRequest)
This is used to build accesstoken request from OAuth application info.
|
org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo |
buildFromJSON(String s) |
org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo |
createApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest)
This method will Register an OAuth client in Okta Authorization Server.
|
void |
deleteApplication(String clientId)
Deletes OAuth Client from Authorization Server.
|
void |
deleteMappedApplication(String clientId) |
void |
deleteRegisteredResourceByAPIId(String apiID) |
void |
deleteScope(String scopeName) |
void |
detachResourceScopes(org.wso2.carbon.apimgt.api.model.API api,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> uriTemplates) |
org.wso2.carbon.apimgt.api.model.AccessTokenInfo |
getAccessTokenByConsumerKey(String s) |
Set<String> |
getActiveTokensByConsumerKey(String s) |
Map<String,org.wso2.carbon.apimgt.api.model.Scope> |
getAllScopes() |
org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration |
getKeyManagerConfiguration() |
org.wso2.carbon.apimgt.api.model.AccessTokenInfo |
getNewApplicationAccessToken(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest)
Gets new access token and returns it in an AccessTokenInfo object.
|
String |
getNewApplicationConsumerSecret(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest) |
Map |
getResourceByApiId(String apiId) |
org.wso2.carbon.apimgt.api.model.Scope |
getScopeByName(String name) |
Map<String,Set<org.wso2.carbon.apimgt.api.model.Scope>> |
getScopesForAPIS(String apiIdsString) |
org.wso2.carbon.apimgt.api.model.AccessTokenInfo |
getTokenMetaData(String accessToken)
This is used to get the meta data of the accesstoken.
|
String |
getType() |
boolean |
isScopeExists(String scopeName) |
void |
loadConfiguration(org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration keyManagerConfiguration)
APIManagerComponent calls this method, passing KeyManagerConfiguration as a String. |
org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo |
mapOAuthApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest)
This method will be called when mapping existing OAuth Clients with Application in API Manager
|
boolean |
registerNewResource(org.wso2.carbon.apimgt.api.model.API api,
Map resourceAttributes) |
void |
registerScope(org.wso2.carbon.apimgt.api.model.Scope scope) |
org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo |
retrieveApplication(String clientId)
This method retrieves OAuth application details by given consumer key.
|
org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo |
updateApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest)
This method will update an existing OAuth client in Okta Authorization Server.
|
org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo |
updateApplicationOwner(org.wso2.carbon.apimgt.api.model.OAuthAppRequest appInfoDTO,
String owner) |
boolean |
updateRegisteredResource(org.wso2.carbon.apimgt.api.model.API api,
Map resourceAttributes) |
void |
updateResourceScopes(org.wso2.carbon.apimgt.api.model.API api,
Set<String> oldLocalScopeKeys,
Set<org.wso2.carbon.apimgt.api.model.Scope> newLocalScopes,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> oldURITemplates,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> newURITemplates) |
void |
updateScope(org.wso2.carbon.apimgt.api.model.Scope scope) |
void |
validateScopes(Set<org.wso2.carbon.apimgt.api.model.Scope> scopes) |
buildAccessTokenRequestFromJSON, buildFromJSON, canHandleToken, handleException, setTenantDomain, validateOAuthAppCreationPropertiespublic void loadConfiguration(org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration keyManagerConfiguration)
throws org.wso2.carbon.apimgt.api.APIManagementException
APIManagerComponent calls this method, passing KeyManagerConfiguration as a String.keyManagerConfiguration - Configuration as a KeyManagerConfigurationorg.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo createApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest)
throws org.wso2.carbon.apimgt.api.APIManagementException
oAuthAppRequest - This object holds all parameters required to register an OAuth client.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo updateApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest)
throws org.wso2.carbon.apimgt.api.APIManagementException
oAuthAppRequest - Parameters to be passed to Authorization Server,
encapsulated as an OAuthAppRequestorg.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo updateApplicationOwner(org.wso2.carbon.apimgt.api.model.OAuthAppRequest appInfoDTO,
String owner)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void deleteApplication(String clientId) throws org.wso2.carbon.apimgt.api.APIManagementException
clientId - consumer key of the OAuth Client.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo retrieveApplication(String clientId) throws org.wso2.carbon.apimgt.api.APIManagementException
clientId - consumer key of the OAuth Client.OAuthApplicationInfo having all the details of an OAuth Client.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.AccessTokenInfo getNewApplicationAccessToken(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest)
throws org.wso2.carbon.apimgt.api.APIManagementException
accessTokenRequest - Info of the token needed.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.AccessTokenRequest buildAccessTokenRequestFromOAuthApp(org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo oAuthApplication,
org.wso2.carbon.apimgt.api.model.AccessTokenRequest tokenRequest)
throws org.wso2.carbon.apimgt.api.APIManagementException
buildAccessTokenRequestFromOAuthApp in interface org.wso2.carbon.apimgt.api.model.KeyManagerbuildAccessTokenRequestFromOAuthApp in class org.wso2.carbon.apimgt.impl.AbstractKeyManageroAuthApplication - OAuth application details.tokenRequest - AccessTokenRequest that is need to be updated with addtional info.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.AccessTokenInfo getTokenMetaData(String accessToken) throws org.wso2.carbon.apimgt.api.APIManagementException
accessToken - AccessToken.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public org.wso2.carbon.apimgt.api.model.KeyManagerConfiguration getKeyManagerConfiguration()
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo buildFromJSON(String s) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo mapOAuthApplication(org.wso2.carbon.apimgt.api.model.OAuthAppRequest oAuthAppRequest)
throws org.wso2.carbon.apimgt.api.APIManagementException
oAuthAppRequest - Details of the OAuth Client to be mapped.OAuthApplicationInfo with the details of the mapped client.org.wso2.carbon.apimgt.api.APIManagementException - This is the custom exception class for API management.public boolean registerNewResource(org.wso2.carbon.apimgt.api.model.API api,
Map resourceAttributes)
throws org.wso2.carbon.apimgt.api.APIManagementException
registerNewResource in interface org.wso2.carbon.apimgt.api.model.KeyManagerregisterNewResource in class org.wso2.carbon.apimgt.impl.AbstractKeyManagerorg.wso2.carbon.apimgt.api.APIManagementExceptionpublic Map getResourceByApiId(String apiId) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic boolean updateRegisteredResource(org.wso2.carbon.apimgt.api.model.API api,
Map resourceAttributes)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void deleteRegisteredResourceByAPIId(String apiID) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void deleteMappedApplication(String clientId) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic Set<String> getActiveTokensByConsumerKey(String s) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic org.wso2.carbon.apimgt.api.model.AccessTokenInfo getAccessTokenByConsumerKey(String s) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic String getNewApplicationConsumerSecret(org.wso2.carbon.apimgt.api.model.AccessTokenRequest accessTokenRequest) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic Map<String,Set<org.wso2.carbon.apimgt.api.model.Scope>> getScopesForAPIS(String apiIdsString) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void registerScope(org.wso2.carbon.apimgt.api.model.Scope scope)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic org.wso2.carbon.apimgt.api.model.Scope getScopeByName(String name) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic Map<String,org.wso2.carbon.apimgt.api.model.Scope> getAllScopes() throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void attachResourceScopes(org.wso2.carbon.apimgt.api.model.API api,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> uriTemplates)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void updateResourceScopes(org.wso2.carbon.apimgt.api.model.API api,
Set<String> oldLocalScopeKeys,
Set<org.wso2.carbon.apimgt.api.model.Scope> newLocalScopes,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> oldURITemplates,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> newURITemplates)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void detachResourceScopes(org.wso2.carbon.apimgt.api.model.API api,
Set<org.wso2.carbon.apimgt.api.model.URITemplate> uriTemplates)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void deleteScope(String scopeName) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void updateScope(org.wso2.carbon.apimgt.api.model.Scope scope)
throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic boolean isScopeExists(String scopeName) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic void validateScopes(Set<org.wso2.carbon.apimgt.api.model.Scope> scopes) throws org.wso2.carbon.apimgt.api.APIManagementException
org.wso2.carbon.apimgt.api.APIManagementExceptionpublic String getType()
Copyright © 2022 WSO2. All rights reserved.