Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 2.53 KB

session.md

File metadata and controls

111 lines (74 loc) · 2.53 KB

Session

3 operation(s). Part of the API index.

Call these as $client-><service>-><method>(...). <service> is the client field for this group — the README lists the field name for every service. These pages group operations the way the OpenAPI specification tags them, which is not always one field per page.


authValidateAccessToken

GET /identity/v2/auth/access_token/validate

Validate Access Token

Validates an Access Token, returning its expiry if valid, or an error if invalid.

Example

function callAuthValidateAccessToken($client) {
    $accessToken = '<accessToken>'; //Optional

    try {
        $response = $client->session->authValidateAccessToken(accessToken: $accessToken);
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Parameters

Name In Type Required Description
access_token query string no Access Token of the User

Returns

AccessTokenResponse


getAccessTokenInfo

GET /identity/v2/auth/access_token

Retrieve Access Token information

Obtains detailed information about the provided Access Token.

Example

function callGetAccessTokenInfo($client) {
    try {
        $response = $client->session->getAccessTokenInfo();
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Returns

AccessTokenInfo


invalidateAccessToken

GET /identity/v2/auth/access_token/invalidate

Invalidate Access Token

Invalidates an active Access Token, expiring its validity.

Example

function callInvalidateAccessToken($client) {
    $preventRefresh = true; //Optional

    try {
        $response = $client->session->invalidateAccessToken(preventRefresh: $preventRefresh);
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Parameters

Name In Type Required Description
preventRefresh query boolean no Whether to prevent the token from being refreshed (true/false).

Returns

IsPostedResponse