public class OidcLogoutV1 extends java.lang.Object implements RestPluginProcess, RestPluginThrottling
POST /oidc/logoutThe frontend calls this endpoint when the user initiates logout. The refresh token cookie is cleared, and the response includes the Cognito logout URL so the frontend can optionally redirect the user for full SSO logout (clearing Cognito's session cookie as well).
Logout is idempotent — it always succeeds even if no refresh token cookie is present.
| 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 |
|---|
OidcLogoutV1() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildCognitoLogoutUrl(java.lang.String logoutEndpoint,
java.lang.String clientId,
java.lang.String logoutUri)
Builds the Cognito logout URL with the required
client_id and
logout_uri query parameters. |
static JSONObject |
buildLogoutResponse(java.lang.String cognitoLogoutUrl)
Builds the JSON logout response returned to the frontend.
|
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 restDefinition,
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 restDefinition,
@Nonnull
MutableDataSource mds)
throws java.lang.Exception
RestPluginProcessrestCreate 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 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.Exception@CheckReturnValue @Nonnull public static JSONObject buildLogoutResponse(@Nonnull java.lang.String cognitoLogoutUrl)
cognitoLogoutUrl - the Cognito logout URL for optional SSO logout@CheckReturnValue
@Nonnull
public static java.lang.String buildCognitoLogoutUrl(@Nonnull
java.lang.String logoutEndpoint,
@Nonnull
java.lang.String clientId,
@Nonnull
java.lang.String logoutUri)
client_id and
logout_uri query parameters.logoutEndpoint - the Cognito logout endpoint base URLclientId - the Cognito app client IDlogoutUri - the URI to redirect to after Cognito logoutstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.