public class OidcExchangeV1 extends java.lang.Object implements RestPluginProcess, RestPluginThrottling
code
on its own callback URL, then POSTs code, redirect_uri, and
code_verifier here. Tokens are returned in the JSON body; the refresh
token is also stored in an HttpOnly cookie (same as OidcCallbackV1).
POST /oidc/exchangeRequest body (JSON): OidcApiParams.PARAM_CODE,
OidcApiParams.PARAM_REDIRECT_URI, OidcApiParams.PARAM_CODE_VERIFIER.
| Modifier and Type | Field and Description |
|---|---|
static int |
RATE_LIMIT_PERIOD_SECONDS
Throttling period in seconds (1 minute).
|
static int |
RATE_LIMIT_REQUESTS
Maximum requests per throttling period.
|
| Constructor and Description |
|---|
OidcExchangeV1() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCounterKey(WebClient client,
RestDefinition restDefinition)
get the key of the throttling counter, the key has to be shorter than 255 characters
|
int |
getPeriod(WebClient client,
RestDefinition rd)
get the throttling period in seconds
|
int |
getRequestLimit(WebClient client,
RestDefinition rd)
-1 is no limit
0 is always reject
n is allow n requests in each throttling period
|
java.lang.Object |
restCreate(WebClient client,
RestDefinition rd,
MutableDataSource mds)
HTTP POST calls the the Create ReST service.
|
java.lang.Object |
restDelete(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP DELETE calls the the Delete ReST service.
|
java.lang.Object |
restRetrieve(WebClient client,
RestDefinition restDefinition,
ReadOnlyDataSource rds)
HTTP GET calls the the Retrieval ReST service.
|
java.lang.Object |
restUpdate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP PUT calls the the Update ReST service.
|
public static final int RATE_LIMIT_REQUESTS
public static final int RATE_LIMIT_PERIOD_SECONDS
@CheckReturnValue
@Nonnull
public java.lang.Object restRetrieve(@Nonnull
WebClient client,
@Nonnull
RestDefinition restDefinition,
@Nonnull
ReadOnlyDataSource rds)
throws java.lang.Exception
RestPluginProcessrestRetrieve in interface RestPluginProcessclient - the client. Null means check only of opsrestDefinition - the definitionrds - the data source to usejava.lang.UnsupportedOperationException - if this method is NOT supported.java.lang.Exception - an error has occurred.@CheckReturnValue
@Nonnull
public java.lang.Object restCreate(@Nonnull
WebClient client,
@Nonnull
RestDefinition rd,
@Nonnull
MutableDataSource mds)
throws java.lang.Exception
RestPluginProcessrestCreate in interface RestPluginProcessclient - the client. Null means check only of opsrd - the definitionmds - the data source to usejava.lang.UnsupportedOperationException - if this method is NOT supported.ExceptionResponse - an error has occurred.java.lang.Exception@CheckReturnValue
@Nonnull
public java.lang.Object restUpdate(@Nonnull
WebClient client,
@Nonnull
RestDefinition restDefinition,
@Nonnull
MutableDataSource mds)
throws java.lang.Exception
RestPluginProcessrestUpdate in interface RestPluginProcessclient - the client. Null means check only of opsrestDefinition - the definitionmds - the data source to usejava.lang.UnsupportedOperationException - if this method is NOT supported.ExceptionResponse - an error has occurred.java.lang.Exception@CheckReturnValue
@Nonnull
public java.lang.Object restDelete(@Nonnull
WebClient client,
@Nonnull
RestDefinition restDefinition,
@Nonnull
MutableDataSource mds)
throws java.lang.Exception
RestPluginProcessrestDelete in interface RestPluginProcessclient - the client. Null means check only of opsrestDefinition - the definitionmds - the data source to use.java.lang.UnsupportedOperationException - if this method is NOT supported.ExceptionResponse - an error has occurred.java.lang.Exception@CheckReturnValue
@Nullable
public java.lang.String getCounterKey(@Nonnull
WebClient client,
@Nonnull
RestDefinition restDefinition)
throws java.lang.Exception
RestPluginThrottlinggetCounterKey in interface RestPluginThrottlingclient - the client. Null means check only of opsrestDefinition - the definitionjava.lang.UnsupportedOperationException - if this method is NOT supported.java.lang.Exception - an error has occurred.public int getRequestLimit(@Nonnull
WebClient client,
@Nonnull
RestDefinition rd)
throws java.lang.Exception
RestPluginThrottlinggetRequestLimit in interface RestPluginThrottlingclient - the client. Null means check only of opsrd - the definitionjava.lang.UnsupportedOperationException - use default throttling settings configured in RestDefinition recordjava.lang.Exceptionpublic int getPeriod(@Nonnull
WebClient client,
@Nonnull
RestDefinition rd)
throws java.lang.Exception
RestPluginThrottlinggetPeriod in interface RestPluginThrottlingclient - the client. Null means check only of opsrd - the definitionjava.lang.UnsupportedOperationException - use default throttling settings configured in RestDefinition recordjava.lang.ExceptionstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.