Class AbstractOAuth2FlowAwareProfileConfiguration

    • Field Detail

      • authorizationCodeFlowPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> authorizationCodeFlowPredicate
        Predicate used to indicate whether authorization code flow is supported by this profile. Default true.
      • implicitFlowPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> implicitFlowPredicate
        Predicate used to indicate whether implicit flow is supported by this profile. Default true.
      • hybridFlowPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> hybridFlowPredicate
        Predicate used to indicate whether hybrid flow is supported by this profile. Default true.
      • refreshTokensPredicate

        @Nonnull
        private Predicate<ProfileRequestContext> refreshTokensPredicate
        Predicate used to indicate whether refresh tokens are supported by this profile. Default true.
    • Constructor Detail

      • AbstractOAuth2FlowAwareProfileConfiguration

        protected AbstractOAuth2FlowAwareProfileConfiguration​(String profileId)
        Constructor.
        Parameters:
        profileId - Unique profile identifier.
    • Method Detail

      • isAuthorizationCodeFlowEnabled

        public boolean isAuthorizationCodeFlowEnabled​(@Nullable
                                                      ProfileRequestContext profileRequestContext)
        Get whether authorization code flow is supported by this profile.
        Parameters:
        profileRequestContext - profile request context
        Returns:
        whether authorization code flow is supported by this profile
      • setAuthorizationCodeFlowEnabled

        public void setAuthorizationCodeFlowEnabled​(boolean flag)
        Set whether authorization code flow is supported by this profile.
        Parameters:
        flag - flag to set
      • setAuthorizationCodeFlowEnabledPredicate

        public void setAuthorizationCodeFlowEnabledPredicate​(@Nonnull
                                                             Predicate<ProfileRequestContext> condition)
        Set condition used to indicate whether authorization code flow is supported by this profile.
        Parameters:
        condition - condition to set
      • isHybridFlowEnabled

        public boolean isHybridFlowEnabled​(@Nullable
                                           ProfileRequestContext profileRequestContext)
        Get whether implicit flow is supported by this profile.
        Parameters:
        profileRequestContext - profile request context
        Returns:
        whether implicit flow is supported by this profile
      • setHybridFlowEnabled

        public void setHybridFlowEnabled​(boolean flag)
        Set whether implicit flow is supported by this profile.
        Parameters:
        flag - flag to set
      • setHybridFlowEnabledPredicate

        public void setHybridFlowEnabledPredicate​(@Nonnull
                                                  Predicate<ProfileRequestContext> condition)
        Set condition used to indicate whether implicit flow is supported by this profile.
        Parameters:
        condition - condition to set
      • isImplicitFlowEnabled

        public boolean isImplicitFlowEnabled​(@Nullable
                                             ProfileRequestContext profileRequestContext)
        Get whether hybrid flow is supported by this profile.
        Parameters:
        profileRequestContext - profile request context
        Returns:
        whether hybrid flow is supported by this profile
      • setImplicitFlowEnabled

        public void setImplicitFlowEnabled​(boolean flag)
        Set whether hybrid flow is supported by this profile.
        Parameters:
        flag - flag to set
      • setImplicitFlowEnabledPredicate

        public void setImplicitFlowEnabledPredicate​(@Nonnull
                                                    Predicate<ProfileRequestContext> condition)
        Set condition used to indicate whether hybrid flow is supported by this profile.
        Parameters:
        condition - condition to set.
      • isRefreshTokensEnabled

        public boolean isRefreshTokensEnabled​(@Nullable
                                              ProfileRequestContext profileRequestContext)
        Get whether refresh tokens are supported by this profile.
        Parameters:
        profileRequestContext - profile request context
        Returns:
        whether refresh tokens are supported by this profile
      • setRefreshTokensEnabled

        public void setRefreshTokensEnabled​(boolean flag)
        Set whether refresh tokens are supported by this profile.
        Parameters:
        flag - flag to set
      • setRefreshTokensEnabledPredicate

        public void setRefreshTokensEnabledPredicate​(@Nonnull
                                                     Predicate<ProfileRequestContext> condition)
        Set condition used to indicate whether refresh tokens are supported by this profile.
        Parameters:
        condition - condition to set