Skip to content

Latest commit

 

History

History
92 lines (62 loc) · 2.37 KB

jwt.md

File metadata and controls

92 lines (62 loc) · 2.37 KB

JWT

2 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.


getJWTTokenByAccessToken

GET /api/jwt/{JwtAppName}/token

Retrieve JWT token by Access Token

Retrieves a JWT token using an Access Token obtained after successful login.

Example

function callGetJWTTokenByAccessToken($client) {
    $jwtAppName = '<jwtAppName>'; //Required
    $nonce = '<nonce>'; //Optional

    try {
        $response = $client->jwt->getJWTTokenByAccessToken(jwtAppName: $jwtAppName, nonce: $nonce);
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Parameters

Name In Type Required Description
JwtAppName path string yes JWT App Name
Nonce query string no random nonce claim

Returns

JWTSignature


getJWTTokenByLoginCredentials

POST /api/jwt/{JwtAppName}/login

Retrieve JWT token

Retrieves a JWT token using login credentials such as Email, Phone, Username, and Password.

Example

function callGetJWTTokenByLoginCredentials($client) {
    $jwtAppName = '<jwtAppName>'; //Required
    $getJWTTokenByLoginCredentialsRequest = new \LoginRadius\Sdk\Internal\OpenApi\Model\GetJWTTokenByLoginCredentialsRequest([]); //Required
    $nonce = '<nonce>'; //Optional

    try {
        $response = $client->jwt->getJWTTokenByLoginCredentials($getJWTTokenByLoginCredentialsRequest, jwtAppName: $jwtAppName, nonce: $nonce);
        echo $response;
    } catch (\LoginRadius\Sdk\Internal\OpenApi\ApiException $e) {
        $lr = \LoginRadius\Sdk\Client::toLoginRadiusException($e);
        echo $lr->description();
    }
}

Parameters

Name In Type Required Description
JwtAppName path string yes JWT App Name
Nonce query string no random nonce claim

Request body

object as application/json.

Returns

JWTSignature