org.keycloak.representations

## Class AccessToken

- java.lang.Object
- - org.keycloak.representations.JsonWebToken
  - - org.keycloak.representations.IDToken
    - - org.keycloak.representations.AccessToken

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    RefreshToken

      public class AccessToken
      extends IDToken

  Version:
    $Revision: 1 $
  Author:
    Bill Burke
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AccessToken.Access`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Set<String>` | `allowedOrigins`
    `protected AccessToken.Access` | `realmAccess`
    `protected Map<String,AccessToken.Access>` | `resourceAccess`
    `protected Set<String>` | `trustedCertificates`

    - ### Fields inherited from class org.keycloak.representations.IDToken

      `address, birthdate, claimsLocales, country, email, emailVerified, familyName, formattedAddress, gender, givenName, locale, locality, middleName, name, nickName, nonce, phoneNumber, phoneNumberVerified, picture, postalCode, preferredUsername, profile, region, sessionState, streetAddress, updatedAt, website, zoneinfo`

    - ### Fields inherited from class org.keycloak.representations.JsonWebToken

      `audience, expiration, id, issuedAt, issuedFor, issuer, notBefore, subject, type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AccessToken()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AccessToken.Access` | `addAccess(String service)`
    `AccessToken` | `audience(String audience)`
    `AccessToken` | `expiration(int expiration)`
    `Set<String>` | `getAllowedOrigins()`
    `AccessToken.Access` | `getRealmAccess()`
    `Map<String,AccessToken.Access>` | `getResourceAccess()`
    `AccessToken.Access` | `getResourceAccess(String resource)`
    `Set<String>` | `getTrustedCertificates()`
    `AccessToken` | `id(String id)`
    `AccessToken` | `issuedAt(int issuedAt)`
    `AccessToken` | `issuedFor(String issuedFor)`
    `AccessToken` | `issuer(String issuer)`
    `boolean` | `isVerifyCaller()` Does the realm require verifying the caller?
    `boolean` | `isVerifyCaller(String resource)` Does the resource override the requirement of verifying the caller?
    `AccessToken` | `notBefore(int notBefore)`
    `void` | `setAllowedOrigins(Set<String> allowedOrigins)`
    `void` | `setRealmAccess(AccessToken.Access realmAccess)`
    `void` | `setResourceAccess(Map<String,AccessToken.Access> resourceAccess)`
    `void` | `setTrustedCertificates(Set<String> trustedCertificates)`
    `AccessToken` | `subject(String subject)`
    `AccessToken` | `type(String type)`

    - ### Methods inherited from class org.keycloak.representations.IDToken

      `getAddress, getBirthdate, getClaimsLocales, getCountry, getEmail, getEmailVerified, getFamilyName, getFormattedAddress, getGender, getGivenName, getLocale, getLocality, getMiddleName, getName, getNickName, getNonce, getPhoneNumber, getPhoneNumberVerified, getPicture, getPostalCode, getPreferredUsername, getProfile, getRegion, getSessionState, getStreetAddress, getUpdatedAt, getWebsite, getZoneinfo, setAddress, setBirthdate, setClaimsLocales, setCountry, setEmail, setEmailVerified, setFamilyName, setFormattedAddress, setGender, setGivenName, setLocale, setLocality, setMiddleName, setName, setNickName, setNonce, setPhoneNumber, setPhoneNumberVerified, setPicture, setPostalCode, setPreferredUsername, setProfile, setRegion, setSessionState, setStreetAddress, setUpdatedAt, setWebsite, setZoneinfo`

    - ### Methods inherited from class org.keycloak.representations.JsonWebToken

      `getAudience, getExpiration, getId, getIssuedAt, getIssuedFor, getIssuer, getNotBefore, getSubject, getType, isActive, isExpired, isNotBefore, issuedNow`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### trustedCertificates

          protected Set<String> trustedCertificates

    - #### allowedOrigins

          protected Set<String> allowedOrigins

    - #### realmAccess

          protected AccessToken.Access realmAccess

    - #### resourceAccess

          protected Map<String,AccessToken.Access> resourceAccess

  - ### Constructor Detail

    - #### AccessToken

          public AccessToken()

  - ### Method Detail

    - #### getResourceAccess

          public Map<String,AccessToken.Access> getResourceAccess()

    - #### setResourceAccess

          public void setResourceAccess(Map<String,AccessToken.Access> resourceAccess)

    - #### isVerifyCaller

          public boolean isVerifyCaller()

      Does the realm require verifying the caller?
      Returns:

    - #### isVerifyCaller

          public boolean isVerifyCaller(String resource)

      Does the resource override the requirement of verifying the caller?
      Parameters:
        `resource` -
      Returns:

    - #### getResourceAccess

          public AccessToken.Access getResourceAccess(String resource)

    - #### addAccess

          public AccessToken.Access addAccess(String service)

    - #### id

          public AccessToken id(String id)

      Overrides:
        `id` in class `JsonWebToken`

    - #### expiration

          public AccessToken expiration(int expiration)

      Overrides:
        `expiration` in class `JsonWebToken`

    - #### notBefore

          public AccessToken notBefore(int notBefore)

      Overrides:
        `notBefore` in class `JsonWebToken`

    - #### issuedAt

          public AccessToken issuedAt(int issuedAt)

      Overrides:
        `issuedAt` in class `JsonWebToken`

    - #### issuer

          public AccessToken issuer(String issuer)

      Overrides:
        `issuer` in class `JsonWebToken`

    - #### audience

          public AccessToken audience(String audience)

      Overrides:
        `audience` in class `JsonWebToken`

    - #### subject

          public AccessToken subject(String subject)

      Overrides:
        `subject` in class `JsonWebToken`

    - #### type

          public AccessToken type(String type)

      Overrides:
        `type` in class `JsonWebToken`

    - #### getAllowedOrigins

          public Set<String> getAllowedOrigins()

    - #### setAllowedOrigins

          public void setAllowedOrigins(Set<String> allowedOrigins)

    - #### getRealmAccess

          public AccessToken.Access getRealmAccess()

    - #### setRealmAccess

          public void setRealmAccess(AccessToken.Access realmAccess)

    - #### getTrustedCertificates

          public Set<String> getTrustedCertificates()

    - #### setTrustedCertificates

          public void setTrustedCertificates(Set<String> trustedCertificates)

    - #### issuedFor

          public AccessToken issuedFor(String issuedFor)

      Overrides:
        `issuedFor` in class `JsonWebToken`

Copyright © 2014. All Rights Reserved.