Package org.gcube.common.iam
Class IntrospectionResult
java.lang.Object
org.gcube.common.iam.IntrospectionResult
Typed result of a token introspection (
D4ScienceIAMClient.introspect(String, String, String), RFC 7662), as answered
by the IAM server. The claims are those the IAM server reports for the token: callers use them instead of decoding the
token themselves, so that the IAM stays the only component that knows which issuers are accepted (federation).
An inactive token carries no claims: every accessor then returns an empty value.
-
Method Details
-
isActive
public boolean isActive()- Returns:
truewhen the IAM server considers the token valid (signature, expiry, revocation, issuer)
-
getSubject
- Returns:
- the
subclaim,nullif inactive
-
getPreferredUsername
- Returns:
- the
preferred_username(orusername) claim
-
getIssuer
- Returns:
- the
issclaim as reported by the IAM server
-
getAudience
- Returns:
- the
audclaim (empty if absent)
-
getAuthorizedParty
- Returns:
- the
azpclaim
-
getClientId
- Returns:
- the
client_idclaim
-
getTokenType
- Returns:
- the
token_typeclaim (ortyp)
-
getScope
- Returns:
- the
scopeclaim, space separated
-
getScopes
- Returns:
- the scopes as a list (empty if none)
-
getExpiry
- Returns:
- the
expclaim in seconds since the epoch,nullif absent
-
getIssuedAt
- Returns:
- the
iatclaim in seconds since the epoch,nullif absent
-
getEmail
- Returns:
- the
emailclaim
-
getResourceAccessRoles
- Returns:
- the roles per resource (
resource_access)
-
getRealmRoles
- Returns:
- the realm roles (
realm_access)
-
getClaims
- Returns:
- the claims of the answer not mapped to a typed accessor (read only)
-
toString
-