Class IssueRegistrationAccessToken

    • Constructor Detail

      • IssueRegistrationAccessToken

        public IssueRegistrationAccessToken()
        Constructor.
    • Method Detail

      • setSealer

        public void setSealer​(@Nonnull
                              DataSealer sealer)
        Set the data sealer for handling access token.
        Parameters:
        sealer - data sealer.
      • setIssuerLookupStrategy

        public void setIssuerLookupStrategy​(@Nonnull
                                            Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the token issuer.
        Parameters:
        strategy - lookup strategy
      • setMetadataPolicyLookupStrategy

        public void setMetadataPolicyLookupStrategy​(@Nonnull
                                                    Function<ProfileRequestContext,​Map<String,​net.shibboleth.oidc.metadata.policy.MetadataPolicy>> strategy)
        Set a lookup strategy for the metadata policy.
        Parameters:
        strategy - lookup strategy
      • setTokenLifetimeLookupStrategy

        public void setTokenLifetimeLookupStrategy​(@Nonnull
                                                   Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the token lifetime.
        Parameters:
        strategy - lookup strategy
      • setPolicyLocationLookupStrategy

        public void setPolicyLocationLookupStrategy​(@Nonnull
                                                    Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the metadata policy location.
        Parameters:
        strategy - lookup strategy
      • setPolicyIdLookupStrategy

        public void setPolicyIdLookupStrategy​(@Nonnull
                                              Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the relying party identifier.
        Parameters:
        strategy - lookup strategy
      • setClientIdLookupStrategy

        public void setClientIdLookupStrategy​(@Nonnull
                                              Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the client identifier.
        Parameters:
        strategy - lookup strategy
      • setReplacementLookupStrategy

        public void setReplacementLookupStrategy​(@Nonnull
                                                 Function<ProfileRequestContext,​String> strategy)
        Set a lookup strategy for the flag signaling registration replacement is allowed.
        Parameters:
        strategy - lookup strategy
      • setPolicyLocationPolicyName

        public void setPolicyLocationPolicyName​(@Nullable @NotEmpty
                                                String name)
        Set an explicit policy name to apply governing policyLocation usage.
        Parameters:
        name - policy name
      • setPolicyIdPolicyName

        public void setPolicyIdPolicyName​(@Nullable @NotEmpty
                                          String name)
        Set an explicit policy name to apply governing policyId usage.
        Parameters:
        name - policy name
      • setClientIdPolicyName

        public void setClientIdPolicyName​(@Nullable @NotEmpty
                                          String name)
        Set an explicit policy name to apply governing clientId usage.
        Parameters:
        name - policy name
      • setDefaultTokenLifetime

        public void setDefaultTokenLifetime​(@Nonnull
                                            Duration lifetime)
        Set the default token lifetime.
        Parameters:
        lifetime - token lifetime
      • checkAccess

        private boolean checkAccess​(@Nonnull
                                    ProfileRequestContext profileRequestContext)
        Check access policies.
        Parameters:
        profileRequestContext - current profile request context
        Returns:
        true iff checks pass
      • addAuthenticationClaims

        private void addAuthenticationClaims​(@Nonnull
                                             ProfileRequestContext profileRequestContext,
                                             @Nonnull
                                             RegistrationClaimsSet.Builder builder)
        Decorate the token with authentication-related claims.
        Parameters:
        profileRequestContext - profile request context
        builder - claims set builder