Class DefaultOIDCUserInfoConfiguration

    • Field Detail

      • resolveAttributesPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> resolveAttributesPredicate
        Whether attributes should be resolved in the course of the profile.
      • encryptionOptionalPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> encryptionOptionalPredicate
        Whether encryption is optional in the face of no key, etc.
      • deniedUserInfoAttributesLookupStrategy

        @Nonnull
        private Function<ProfileRequestContext,​Set<String>> deniedUserInfoAttributesLookupStrategy
        Lookup function to supply attribute IDs to omit from UserInfo token.
    • Constructor Detail

      • DefaultOIDCUserInfoConfiguration

        public DefaultOIDCUserInfoConfiguration()
        Constructor.
      • DefaultOIDCUserInfoConfiguration

        public DefaultOIDCUserInfoConfiguration​(@Nonnull @NotEmpty
                                                String profileId)
        Creates a new configuration instance.
        Parameters:
        profileId - Unique profile identifier.
    • Method Detail

      • setResolveAttributes

        public void setResolveAttributes​(boolean flag)
        Set whether attributes should be resolved during the profile.
        Parameters:
        flag - flag to set
      • setResolveAttributesPredicate

        public void setResolveAttributesPredicate​(@Nonnull
                                                  Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether attributes should be resolved during the profile.
        Parameters:
        condition - condition to set
      • setEncryptionOptional

        public void setEncryptionOptional​(boolean flag)
        Set whether encryption is optional in the face of a missing key, etc.
        Parameters:
        flag - flag to set
      • setEncryptionOptionalPredicate

        public void setEncryptionOptionalPredicate​(@Nonnull
                                                   Predicate<ProfileRequestContext> condition)
        Set a condition to determine whether encryption is optional in the face of a missing key, etc.
        Parameters:
        condition - condition to set
      • getDeniedUserInfoAttributes

        @Nonnull
        @NonnullElements
        @NotLive
        public Set<String> getDeniedUserInfoAttributes​(@Nullable
                                                       ProfileRequestContext profileRequestContext)
        Description copied from interface: OIDCUserInfoConfiguration
        Get the set of attribute IDs which should be omitted from the UserInfo token.

        Default behavior is to include all claims, but omiited claims also affect the set that may need to be embedded for recovery into the access/refresh tokens.

        Specified by:
        getDeniedUserInfoAttributes in interface OIDCUserInfoConfiguration
        Parameters:
        profileRequestContext - profile request context
        Returns:
        the attribute IDs to omit from UserInfo token
      • setDeniedUserInfoAttributes

        public void setDeniedUserInfoAttributes​(@Nullable @NonnullElements
                                                Collection<String> attributes)
        Set the set of attribute IDs which should be omitted from the UserInfo token.

        Default behavior is to include all claims, but omiited claims also affect the set that may need to be embedded for recovery into the access/refresh tokens.

        Parameters:
        attributes - the attribute IDs to omit from UserInfo token
      • setDeniedUserInfoAttributesLookupStrategy

        public void setDeniedUserInfoAttributesLookupStrategy​(@Nonnull
                                                              Function<ProfileRequestContext,​Set<String>> strategy)
        Set a lookup strategy for the set of attribute IDs which should be omitted from the UserInfo token.
        Parameters:
        strategy - lookup strategy