io.vertx.ext.auth.oauth2

## Interface KeycloakHelper

-     public interface KeycloakHelper

  Helper class for processing Keycloak principal.
  Author:
    Eric Zhao

- - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JsonObject` | `accessToken(JsonObject principal)` Get decoded `access_token` from the principal.
    `static String` | `acr(JsonObject principal)`
    `static Set<String>` | `allowedOrigins(JsonObject principal)`
    `static int` | `authTime(JsonObject principal)`
    `static String` | `email(JsonObject principal)`
    `static JsonObject` | `idToken(JsonObject principal)` Get decoded `id_token` from the principal.
    `static String` | `name(JsonObject principal)`
    `static String` | `nickName(JsonObject principal)`
    `static JsonObject` | `parseToken(String token)` Parse the token string with base64 decoder.
    `static String` | `preferredUsername(JsonObject principal)`
    `static String` | `rawAccessToken(JsonObject principal)` Get raw `access_token` string from the principal.
    `static String` | `rawIdToken(JsonObject principal)` Get raw `id_token` string from the principal.
    `static String` | `sessionState(JsonObject principal)`

- - ### Method Detail

    - #### rawIdToken

          static String rawIdToken(JsonObject principal)

      Get raw `id_token` string from the principal.
      Parameters:
        `principal` - user principal
      Returns:
        the raw id token string

    - #### idToken

          static JsonObject idToken(JsonObject principal)

      Get decoded `id_token` from the principal.
      Parameters:
        `principal` - user principal
      Returns:
        the id token

    - #### rawAccessToken

          static String rawAccessToken(JsonObject principal)

      Get raw `access_token` string from the principal.
      Parameters:
        `principal` - user principal
      Returns:
        the raw access token string

    - #### accessToken

          static JsonObject accessToken(JsonObject principal)

      Get decoded `access_token` from the principal.
      Parameters:
        `principal` - user principal
      Returns:
        the access token

    - #### authTime

          static int authTime(JsonObject principal)

    - #### sessionState

          static String sessionState(JsonObject principal)

    - #### acr

          static String acr(JsonObject principal)

    - #### name

          static String name(JsonObject principal)

    - #### email

          static String email(JsonObject principal)

    - #### preferredUsername

          static String preferredUsername(JsonObject principal)

    - #### nickName

          static String nickName(JsonObject principal)

    - #### allowedOrigins

          static Set<String> allowedOrigins(JsonObject principal)

    - #### parseToken

          static JsonObject parseToken(String token)

      Parse the token string with base64 decoder. This will only obtain the "payload" part of the token.
      Parameters:
        `token` - token string
      Returns:
        token payload json object

Copyright © 2019 Eclipse. All rights reserved.