All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sh.ory.hydra.api.PublicApi Maven / Gradle / Ivy

/*
 * ORY Hydra
 * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
 *
 * The version of the OpenAPI document: latest
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package sh.ory.hydra.api;

import sh.ory.hydra.ApiCallback;
import sh.ory.hydra.ApiClient;
import sh.ory.hydra.ApiException;
import sh.ory.hydra.ApiResponse;
import sh.ory.hydra.Configuration;
import sh.ory.hydra.Pair;
import sh.ory.hydra.ProgressRequestBody;
import sh.ory.hydra.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import sh.ory.hydra.model.GenericError;
import sh.ory.hydra.model.HealthNotReadyStatus;
import sh.ory.hydra.model.HealthStatus;
import sh.ory.hydra.model.JSONWebKeySet;
import sh.ory.hydra.model.Oauth2TokenResponse;
import sh.ory.hydra.model.UserinfoResponse;
import sh.ory.hydra.model.WellKnown;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PublicApi {
    private ApiClient localVarApiClient;

    public PublicApi() {
        this(Configuration.getDefaultApiClient());
    }

    public PublicApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    /**
     * Build call for disconnectUser
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
*/ public okhttp3.Call disconnectUserCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/oauth2/sessions/logout"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call disconnectUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = disconnectUserCall(_callback); return localVarCall; } /** * OpenID Connect Front-Backchannel enabled Logout * This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
*/ public void disconnectUser() throws ApiException { disconnectUserWithHttpInfo(); } /** * OpenID Connect Front-Backchannel enabled Logout * This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
*/ public ApiResponse disconnectUserWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = disconnectUserValidateBeforeCall(null); return localVarApiClient.execute(localVarCall); } /** * OpenID Connect Front-Backchannel enabled Logout (asynchronously) * This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
*/ public okhttp3.Call disconnectUserAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = disconnectUserValidateBeforeCall(_callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for discoverOpenIDConfiguration * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 wellKnown -
401 genericError -
500 genericError -
*/ public okhttp3.Call discoverOpenIDConfigurationCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/.well-known/openid-configuration"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call discoverOpenIDConfigurationValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = discoverOpenIDConfigurationCall(_callback); return localVarCall; } /** * OpenID Connect Discovery * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ * @return WellKnown * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 wellKnown -
401 genericError -
500 genericError -
*/ public WellKnown discoverOpenIDConfiguration() throws ApiException { ApiResponse localVarResp = discoverOpenIDConfigurationWithHttpInfo(); return localVarResp.getData(); } /** * OpenID Connect Discovery * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ * @return ApiResponse<WellKnown> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 wellKnown -
401 genericError -
500 genericError -
*/ public ApiResponse discoverOpenIDConfigurationWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = discoverOpenIDConfigurationValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * OpenID Connect Discovery (asynchronously) * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/ * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 wellKnown -
401 genericError -
500 genericError -
*/ public okhttp3.Call discoverOpenIDConfigurationAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = discoverOpenIDConfigurationValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for isInstanceReady * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
*/ public okhttp3.Call isInstanceReadyCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/health/ready"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call isInstanceReadyValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = isInstanceReadyCall(_callback); return localVarCall; } /** * Check readiness status * This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @return HealthStatus * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
*/ public HealthStatus isInstanceReady() throws ApiException { ApiResponse localVarResp = isInstanceReadyWithHttpInfo(); return localVarResp.getData(); } /** * Check readiness status * This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @return ApiResponse<HealthStatus> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
*/ public ApiResponse isInstanceReadyWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = isInstanceReadyValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Check readiness status (asynchronously) * This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance. * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
*/ public okhttp3.Call isInstanceReadyAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = isInstanceReadyValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for oauth2Token * @param grantType (required) * @param code (optional) * @param refreshToken (optional) * @param redirectUri (optional) * @param clientId (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 oauth2TokenResponse -
401 genericError -
500 genericError -
*/ public okhttp3.Call oauth2TokenCall(String grantType, String code, String refreshToken, String redirectUri, String clientId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/oauth2/token"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (grantType != null) { localVarFormParams.put("grant_type", grantType); } if (code != null) { localVarFormParams.put("code", code); } if (refreshToken != null) { localVarFormParams.put("refresh_token", refreshToken); } if (redirectUri != null) { localVarFormParams.put("redirect_uri", redirectUri); } if (clientId != null) { localVarFormParams.put("client_id", clientId); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basic", "oauth2" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call oauth2TokenValidateBeforeCall(String grantType, String code, String refreshToken, String redirectUri, String clientId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'grantType' is set if (grantType == null) { throw new ApiException("Missing the required parameter 'grantType' when calling oauth2Token(Async)"); } okhttp3.Call localVarCall = oauth2TokenCall(grantType, code, refreshToken, redirectUri, clientId, _callback); return localVarCall; } /** * The OAuth 2.0 token endpoint * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! * @param grantType (required) * @param code (optional) * @param refreshToken (optional) * @param redirectUri (optional) * @param clientId (optional) * @return Oauth2TokenResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 oauth2TokenResponse -
401 genericError -
500 genericError -
*/ public Oauth2TokenResponse oauth2Token(String grantType, String code, String refreshToken, String redirectUri, String clientId) throws ApiException { ApiResponse localVarResp = oauth2TokenWithHttpInfo(grantType, code, refreshToken, redirectUri, clientId); return localVarResp.getData(); } /** * The OAuth 2.0 token endpoint * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! * @param grantType (required) * @param code (optional) * @param refreshToken (optional) * @param redirectUri (optional) * @param clientId (optional) * @return ApiResponse<Oauth2TokenResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 oauth2TokenResponse -
401 genericError -
500 genericError -
*/ public ApiResponse oauth2TokenWithHttpInfo(String grantType, String code, String refreshToken, String redirectUri, String clientId) throws ApiException { okhttp3.Call localVarCall = oauth2TokenValidateBeforeCall(grantType, code, refreshToken, redirectUri, clientId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * The OAuth 2.0 token endpoint (asynchronously) * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! * @param grantType (required) * @param code (optional) * @param refreshToken (optional) * @param redirectUri (optional) * @param clientId (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 oauth2TokenResponse -
401 genericError -
500 genericError -
*/ public okhttp3.Call oauth2TokenAsync(String grantType, String code, String refreshToken, String redirectUri, String clientId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = oauth2TokenValidateBeforeCall(grantType, code, refreshToken, redirectUri, clientId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for oauthAuth * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public okhttp3.Call oauthAuthCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/oauth2/auth"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call oauthAuthValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = oauthAuthCall(_callback); return localVarCall; } /** * The OAuth 2.0 authorize endpoint * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public void oauthAuth() throws ApiException { oauthAuthWithHttpInfo(); } /** * The OAuth 2.0 authorize endpoint * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public ApiResponse oauthAuthWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = oauthAuthValidateBeforeCall(null); return localVarApiClient.execute(localVarCall); } /** * The OAuth 2.0 authorize endpoint (asynchronously) * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public okhttp3.Call oauthAuthAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = oauthAuthValidateBeforeCall(_callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for revokeOAuth2Token * @param token (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public okhttp3.Call revokeOAuth2TokenCall(String token, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/oauth2/revoke"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (token != null) { localVarFormParams.put("token", token); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basic", "oauth2" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call revokeOAuth2TokenValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { // verify the required parameter 'token' is set if (token == null) { throw new ApiException("Missing the required parameter 'token' when calling revokeOAuth2Token(Async)"); } okhttp3.Call localVarCall = revokeOAuth2TokenCall(token, _callback); return localVarCall; } /** * Revoke OAuth2 tokens * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. * @param token (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public void revokeOAuth2Token(String token) throws ApiException { revokeOAuth2TokenWithHttpInfo(token); } /** * Revoke OAuth2 tokens * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. * @param token (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public ApiResponse revokeOAuth2TokenWithHttpInfo(String token) throws ApiException { okhttp3.Call localVarCall = revokeOAuth2TokenValidateBeforeCall(token, null); return localVarApiClient.execute(localVarCall); } /** * Revoke OAuth2 tokens (asynchronously) * Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for. * @param token (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 genericError -
500 genericError -
*/ public okhttp3.Call revokeOAuth2TokenAsync(String token, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = revokeOAuth2TokenValidateBeforeCall(token, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for userinfo * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 userinfoResponse -
401 genericError -
500 genericError -
*/ public okhttp3.Call userinfoCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/userinfo"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "oauth2" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call userinfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = userinfoCall(_callback); return localVarCall; } /** * OpenID Connect Userinfo * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). * @return UserinfoResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 userinfoResponse -
401 genericError -
500 genericError -
*/ public UserinfoResponse userinfo() throws ApiException { ApiResponse localVarResp = userinfoWithHttpInfo(); return localVarResp.getData(); } /** * OpenID Connect Userinfo * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). * @return ApiResponse<UserinfoResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 userinfoResponse -
401 genericError -
500 genericError -
*/ public ApiResponse userinfoWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = userinfoValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * OpenID Connect Userinfo (asynchronously) * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 userinfoResponse -
401 genericError -
500 genericError -
*/ public okhttp3.Call userinfoAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = userinfoValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for wellKnown * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 JSONWebKeySet -
500 genericError -
*/ public okhttp3.Call wellKnownCall(final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/.well-known/jwks.json"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call wellKnownValidateBeforeCall(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = wellKnownCall(_callback); return localVarCall; } /** * JSON Web Keys Discovery * This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. * @return JSONWebKeySet * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 JSONWebKeySet -
500 genericError -
*/ public JSONWebKeySet wellKnown() throws ApiException { ApiResponse localVarResp = wellKnownWithHttpInfo(); return localVarResp.getData(); } /** * JSON Web Keys Discovery * This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. * @return ApiResponse<JSONWebKeySet> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 JSONWebKeySet -
500 genericError -
*/ public ApiResponse wellKnownWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = wellKnownValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * JSON Web Keys Discovery (asynchronously) * This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others. * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 JSONWebKeySet -
500 genericError -
*/ public okhttp3.Call wellKnownAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = wellKnownValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy