Top Inners Fields Constructors Methods
org.keycloak.representations

public Class AccessToken

extends IDToken
Class Inheritance
Known Direct Subclasses
org.keycloak.representations.RefreshToken, org.keycloak.representations.oidc.TokenMetadataRepresentation
Imports
com.fasterxml.jackson.annotation.JsonIgnore, .JsonProperty, org.keycloak.TokenCategory, org.keycloak.representations.idm.authorization.Permission, java.io.Serializable, java.util.Collection, .Collections, .HashMap, .HashSet, .Map, .Set

Author
Bill Burke
Version
$Revision: 1 $

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
protected Set<String>
protected AccessToken.Authorization
protected AccessToken.Confirmation
protected AccessToken.Access
protected Map<String, AccessToken.Access>
protected String
protected Set<String>
Inherited from org.keycloak.representations.IDToken:
accessTokenHashACRacrADDRESSaddressAT_HASHAUTH_TIMEauth_timeBIRTHDATEbirthdateC_HASHCLAIMS_LOCALESclaimsLocalescodeHashEMAILemailEMAIL_VERIFIEDemailVerifiedFAMILY_NAMEfamilyNameGENDERgenderGIVEN_NAMEgivenNameLOCALElocaleMIDDLE_NAMEmiddleNameNAMEnameNICKNAMEnickNameNONCEnoncePHONE_NUMBERPHONE_NUMBER_VERIFIEDphoneNumberphoneNumberVerifiedPICTUREpicturePREFERRED_USERNAMEpreferredUsernamePROFILEprofileS_HASHSESSION_IDSESSION_STATEsessionStatestateHashUPDATED_ATupdatedAtWEBSITEwebsiteZONEINFOzoneinfo

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AccessToken.Access
addAccess(String service)

public AccessToken
public Set<String>
public AccessToken.Authorization
public TokenCategory
public AccessToken.Confirmation
public AccessToken.Access
public Map<String, AccessToken.Access>
public AccessToken.Access
public String
public Set<String>
public AccessToken
public AccessToken
public AccessToken
public AccessToken
public boolean
isVerifyCaller()

Does the realm require verifying the caller?

public boolean
isVerifyCaller(String resource)

Does the resource override the requirement of verifying the caller?

public AccessToken
public void
setAllowedOrigins(Set<String> allowedOrigins)

public void
public void
public void
public void
public void
public void
setTrustedCertificates(Set<String> trustedCertificates)

public AccessToken
public AccessToken
Inherited from org.keycloak.representations.IDToken:
getAccessTokenHashgetAcrgetAddressgetAuth_timegetAuthTimegetBirthdategetClaimsLocalesgetCodeHashgetEmailgetEmailVerifiedgetFamilyNamegetGendergetGivenNamegetLocalegetMiddleNamegetNamegetNickNamegetNoncegetPhoneNumbergetPhoneNumberVerifiedgetPicturegetPreferredUsernamegetProfilegetSessionIdgetSessionStategetStateHashgetUpdatedAtgetWebsitegetZoneinfosetAccessTokenHashsetAcrsetAddresssetAuth_timesetAuthTimesetBirthdatesetClaimsLocalessetCodeHashsetEmailsetEmailVerifiedsetFamilyNamesetGendersetGivenNamesetLocalesetMiddleNamesetNamesetNickNamesetNoncesetPhoneNumbersetPhoneNumberVerifiedsetPicturesetPreferredUsernamesetProfilesetSessionStatesetStateHashsetUpdatedAtsetWebsitesetZoneinfo

Field Detail

allowedOriginsback to summary
protected Set<String> allowedOrigins
Annotations
@JsonProperty:allowed-origins
authorizationback to summary
protected AccessToken.Authorization authorization
Annotations
@JsonProperty:authorization
confirmationback to summary
protected AccessToken.Confirmation confirmation
Annotations
@JsonProperty:cnf
realmAccessback to summary
protected AccessToken.Access realmAccess
Annotations
@JsonProperty:realm_access
resourceAccessback to summary
protected Map<String, AccessToken.Access> resourceAccess
Annotations
@JsonProperty:resource_access
scopeback to summary
protected String scope
Annotations
@JsonProperty:scope
trustedCertificatesback to summary
protected Set<String> trustedCertificates
Annotations
@JsonProperty:trusted-certs

Constructor Detail

AccessTokenback to summary
public AccessToken()

Method Detail

addAccessback to summary
public AccessToken.Access addAccess(String service)
expirationback to summary
public AccessToken expiration(int expiration)

Overrides org.keycloak.representations.JsonWebToken.expiration.

Annotations
@Override
getAllowedOriginsback to summary
public Set<String> getAllowedOrigins()
getAuthorizationback to summary
public AccessToken.Authorization getAuthorization()
getCategoryback to summary
public TokenCategory getCategory()

Overrides org.keycloak.representations.IDToken.getCategory.

Implements org.keycloak.Token.getCategory.

Annotations
@Override
getConfirmationback to summary
public AccessToken.Confirmation getConfirmation()
getRealmAccessback to summary
public AccessToken.Access getRealmAccess()
getResourceAccessback to summary
public Map<String, AccessToken.Access> getResourceAccess()
Annotations
@JsonIgnore
getResourceAccessback to summary
public AccessToken.Access getResourceAccess(String resource)
Annotations
@JsonIgnore
getScopeback to summary
public String getScope()
getTrustedCertificatesback to summary
public Set<String> getTrustedCertificates()
idback to summary
public AccessToken id(String id)

Overrides org.keycloak.representations.JsonWebToken.id.

Annotations
@Override
issuedAtback to summary
public AccessToken issuedAt(int issuedAt)

Overrides org.keycloak.representations.JsonWebToken.issuedAt.

Annotations
@Override
issuedForback to summary
public AccessToken issuedFor(String issuedFor)

Overrides org.keycloak.representations.JsonWebToken.issuedFor.

Annotations
@Override
issuerback to summary
public AccessToken issuer(String issuer)

Overrides org.keycloak.representations.JsonWebToken.issuer.

Annotations
@Override
isVerifyCallerback to summary
public boolean isVerifyCaller()

Does the realm require verifying the caller?

Annotations
@JsonIgnore
isVerifyCallerback to summary
public boolean isVerifyCaller(String resource)

Does the resource override the requirement of verifying the caller?

Annotations
@JsonIgnore
notBeforeback to summary
public AccessToken notBefore(int notBefore)

Overrides org.keycloak.representations.JsonWebToken.notBefore.

Annotations
@Override
setAllowedOriginsback to summary
public void setAllowedOrigins(Set<String> allowedOrigins)
setAuthorizationback to summary
public void setAuthorization(AccessToken.Authorization authorization)
setConfirmationback to summary
public void setConfirmation(AccessToken.Confirmation confirmation)
setRealmAccessback to summary
public void setRealmAccess(AccessToken.Access realmAccess)
setResourceAccessback to summary
public void setResourceAccess(Map<String, AccessToken.Access> resourceAccess)
setScopeback to summary
public void setScope(String scope)
setTrustedCertificatesback to summary
public void setTrustedCertificates(Set<String> trustedCertificates)
subjectback to summary
public AccessToken subject(String subject)

Overrides org.keycloak.representations.JsonWebToken.subject.

Annotations
@Override
typeback to summary
public AccessToken type(String type)

Overrides org.keycloak.representations.JsonWebToken.type.

Annotations
@Override
org.keycloak.representations back to summary

public Class AccessToken.Access

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
protected Set<String>
protected Boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AccessToken.Access
public AccessToken.Access
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public Set<String>
public Boolean
public boolean
public AccessToken.Access
roles(Set<String> roles)

public AccessToken.Access
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rolesback to summary
protected Set<String> roles
Annotations
@JsonProperty:roles
verifyCallerback to summary
protected Boolean verifyCaller
Annotations
@JsonProperty:verify_caller

Constructor Detail

Accessback to summary
public Access()

Method Detail

addRoleback to summary
public AccessToken.Access addRole(String role)
cloneback to summary
public AccessToken.Access clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:AccessToken.Access

a clone of this instance.

getRolesback to summary
public Set<String> getRoles()
getVerifyCallerback to summary
public Boolean getVerifyCaller()
isUserInRoleback to summary
public boolean isUserInRole(String role)
Annotations
@JsonIgnore
rolesback to summary
public AccessToken.Access roles(Set<String> roles)
verifyCallerback to summary
public AccessToken.Access verifyCaller(Boolean required)
org.keycloak.representations back to summary

public Class AccessToken.Authorization

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Field Summary

Modifier and TypeField and Description
private Collection<Permission>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Collection<Permission>
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

permissionsback to summary
private Collection<Permission> permissions
Annotations
@JsonProperty:permissions

Constructor Detail

Authorizationback to summary
public Authorization()

Method Detail

getPermissionsback to summary
public Collection<Permission> getPermissions()
setPermissionsback to summary
public void setPermissions(Collection<Permission> permissions)
org.keycloak.representations back to summary

public Class AccessToken.Confirmation

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
protected String
protected String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
public void
setCertThumbprint(String certThumbprint)

public void
setKeyThumbprint(String keyThumbprint)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certThumbprintback to summary
protected String certThumbprint
Annotations
@JsonProperty:x5t#S256
keyThumbprintback to summary
protected String keyThumbprint
Annotations
@JsonProperty:jkt

Constructor Detail

Confirmationback to summary
public Confirmation()

Method Detail

getCertThumbprintback to summary
public String getCertThumbprint()
getKeyThumbprintback to summary
public String getKeyThumbprint()
setCertThumbprintback to summary
public void setCertThumbprint(String certThumbprint)
setKeyThumbprintback to summary
public void setKeyThumbprint(String keyThumbprint)