Skip to content

Latest commit

 

History

History
117 lines (77 loc) · 2.63 KB

cross-device-sso.md

File metadata and controls

117 lines (77 loc) · 2.63 KB

Cross Device SSO

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.


generateQRCode

GET /sso/mobile/generate

Retrieve QR code

Retrieves a QR code for Cross Device SSO.

Example

public static void callGenerateQRCode(LoginRadiusClient client) {
  String expiry = "<expiry>"; //Optional

  try {
    var response = client.crossDeviceSso.generateQRCode(expiry);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
expiry query string no Code Expiry time (in second) in second, Min:0, Max:300

Returns

QRCodeResponse


getAccessTokenByPing

GET /sso/mobile/token

Retrieve Access Token by ping

Retrieves an Access Token by ping after a User scans a QR code during mobile login.

Example

public static void callGetAccessTokenByPing(LoginRadiusClient client) {
  String code = "<code>"; //Optional

  try {
    var response = client.crossDeviceSso.getAccessTokenByPing(code);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
code query string no QR Code By Generate QR Code API

Returns

AccessTokenByPingQRCodeResponse


mapQRCodeToAccessToken

POST /sso/mobile/token

Map QR code to Access Token

Maps a scanned QR code to an Access Token during mobile login.

Example

public static void callMapQRCodeToAccessToken(LoginRadiusClient client) {
  QRCodeMapToToken qrCodeMapToToken = new QRCodeMapToToken().access_token("<access_token>").code("<code>"); //Required

  try {
    var response = client.crossDeviceSso.mapQRCodeToAccessToken(qrCodeMapToToken);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Request body

QRCodeMapToToken as application/json.

Returns

QRCodeMapToTokenResponse