Class AccessTokenContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.plugin.oidc.op.messaging.context.AccessTokenContext
All Implemented Interfaces:
Iterable<BaseContext>

public final class AccessTokenContext extends BaseContext
Subcontext carrying information used to produce access tokens.
Since:
3.1.0
  • Field Details

    • lifetime

      @Nullable private Duration lifetime
      Lifetime of the token.
    • opaque

      @Nullable @NotEmpty private String opaque
      Opaque token value if JWT format is not used.
    • jwt

      @Nullable private com.nimbusds.jwt.JWT jwt
      The signed/encrypted token in the case of JWT format.
  • Constructor Details

    • AccessTokenContext

      public AccessTokenContext()
  • Method Details

    • getOpaque

      @Nullable @NotEmpty public String getOpaque()
      Get the token string in the case of an opaque token.
      Returns:
      the token value
    • setOpaque

      @Nonnull public AccessTokenContext setOpaque(@Nullable @NotEmpty String token)
      Set the token string in the case of an opaque token.
      Parameters:
      token - the token string
      Returns:
      this context
    • getJWT

      @Nullable public com.nimbusds.jwt.JWT getJWT()
      Get the JWT in the case of a token in that form.

      May be in various states prior to signing/encryption.

      Returns:
      the JWT
    • setJWT

      @Nonnull public AccessTokenContext setJWT(@Nullable com.nimbusds.jwt.JWT token)
      Set the JWT in the case of a token in that form.

      May be in various states prior to signing/encryption.

      Parameters:
      token - the JWT
      Returns:
      this context
    • getLifetime

      @Nullable public Duration getLifetime()
      Get the token lifetime.
      Returns:
      lifetime
    • setLifetime

      @Nonnull public AccessTokenContext setLifetime(@Nullable Duration lt)
      Set the token lifetime.
      Parameters:
      lt - lifetime
      Returns:
      this context