Class AddResponseTypesToClientMetadata

    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • authorizationCodeFlowPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> authorizationCodeFlowPredicate
        Predicate used to indicate whether authorization code flow is enabled.
      • implicitFlowPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> implicitFlowPredicate
        Predicate used to indicate whether implicit flow is enabled.
      • supportedResponseTypes

        @Nonnull
        private Map<com.nimbusds.oauth2.sdk.ResponseType,​Predicate<ProfileRequestContext>> supportedResponseTypes
        Map of supported response types and their corresponding predicates.
    • Constructor Detail

      • AddResponseTypesToClientMetadata

        public AddResponseTypesToClientMetadata()
        Constructor.
    • Method Detail

      • getAuthorizationCodeFlowEnabled

        public Predicate<ProfileRequestContext> getAuthorizationCodeFlowEnabled()
        Get predicate used to indicate whether authorization code flow is enabled.
        Returns:
        Predicate used to indicate whether authorization code flow is enabled.
      • setAuthorizationCodeFlowEnabled

        public void setAuthorizationCodeFlowEnabled​(Predicate<ProfileRequestContext> predicate)
        Set predicate used to indicate whether authorization code flow is enabled.
        Parameters:
        predicate - What to set.
      • getImplicitFlowEnabled

        public Predicate<ProfileRequestContext> getImplicitFlowEnabled()
        Get predicate used to indicate whether hybrid flow is enabled.
        Returns:
        Predicate used to indicate whether hybrid flow is enabled.
      • setImplicitFlowEnabled

        public void setImplicitFlowEnabled​(Predicate<ProfileRequestContext> predicate)
        Set predicate used to indicate whether hybrid flow is enabled.
        Parameters:
        predicate - What to set.
      • setSupportedResponseTypes

        public void setSupportedResponseTypes​(Map<com.nimbusds.oauth2.sdk.ResponseType,​Predicate<ProfileRequestContext>> types)
        Set map of supported response types and their corresponding predicates.
        Parameters:
        types - What to set.
      • getSupportedResponseTypes

        public Map<com.nimbusds.oauth2.sdk.ResponseType,​Predicate<ProfileRequestContext>> getSupportedResponseTypes()
        Get map of supported response types and their corresponding predicates.
        Returns:
        Map of supported response types and their corresponding predicates.
      • addResponseTypeIfEnabled

        protected void addResponseTypeIfEnabled​(Set<com.nimbusds.oauth2.sdk.ResponseType> resultTypes,
                                                com.nimbusds.oauth2.sdk.ResponseType responseType,
                                                Predicate<ProfileRequestContext> predicate,
                                                ProfileRequestContext profileRequestContext)
        Adds a given response type to the given set of response types, if the given predicate is true.
        Parameters:
        resultTypes - The result set where the response type is potentially added.
        responseType - The response type to check.
        predicate - The predicate used for checking.
        profileRequestContext - The profile context used as an input for the predicate.