Class AppAuthConfigurer


  • public class AppAuthConfigurer
    extends java.lang.Object
    AppAuth Integration, https://github.com/openid/AppAuth-Android this class provides AppAuth integration and customization
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AppAuthConfigurer appAuthConfiguration​(androidx.core.util.Consumer<net.openid.appauth.AppAuthConfiguration.Builder> appAuthConfiguration)
      Override the AppAuthConfiguration that was prepared by the SDK.
      AppAuthConfigurer authorizationRequest​(androidx.core.util.Consumer<net.openid.appauth.AuthorizationRequest.Builder> authorizationRequest)
      Override the AuthorizationRequest that was prepared by the SDK.
      AppAuthConfigurer authorizationServiceConfiguration​(org.forgerock.android.auth.Supplier<net.openid.appauth.AuthorizationServiceConfiguration> authorizationServiceConfiguration)
      Override the default OAuth2 endpoint defined under the String.xml forgerock_url.
      AppAuthConfigurer customTabsIntent​(androidx.core.util.Consumer<androidx.browser.customtabs.CustomTabsIntent.Builder> customTabsIntent)
      Override the CustomTabsIntent that was prepared by the SDK.
      FRUser.Browser done()
      Finish up the AppAuth customization.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AppAuthConfigurer

        public AppAuthConfigurer​(FRUser.Browser parent)
    • Method Detail

      • authorizationServiceConfiguration

        public AppAuthConfigurer authorizationServiceConfiguration​(@NonNull
                                                                   org.forgerock.android.auth.Supplier<net.openid.appauth.AuthorizationServiceConfiguration> authorizationServiceConfiguration)
        Override the default OAuth2 endpoint defined under the String.xml forgerock_url.
        Parameters:
        authorizationServiceConfiguration - Supplier that provide the AuthorizationServiceConfiguration, oauth2 endpoint.
        Returns:
        This AppAuthConfigurer
      • authorizationRequest

        public AppAuthConfigurer authorizationRequest​(@NonNull
                                                      androidx.core.util.Consumer<net.openid.appauth.AuthorizationRequest.Builder> authorizationRequest)
        Override the AuthorizationRequest that was prepared by the SDK. The client_id, response type (code), redirect uri, scope are populated by the configuration defined under string.xml forgerock_oauth_client_id, forgerock_oauth_redirect_uri, forgerock_oauth_scope. Developer can provide more customization on the AuthorizationRequest object, for example AuthorizationRequest.Builder.setPrompt(String)
        Parameters:
        authorizationRequest - Consumer that override the AuthorizationRequest, some attributes are pre-populated by the provided AuthorizationRequest
        Returns:
        This AppAuthConfigurer
      • appAuthConfiguration

        public AppAuthConfigurer appAuthConfiguration​(@NonNull
                                                      androidx.core.util.Consumer<net.openid.appauth.AppAuthConfiguration.Builder> appAuthConfiguration)
        Override the AppAuthConfiguration that was prepared by the SDK.
        Parameters:
        appAuthConfiguration - Consumer that override the AppAuthConfiguration
      • customTabsIntent

        public AppAuthConfigurer customTabsIntent​(@NonNull
                                                  androidx.core.util.Consumer<androidx.browser.customtabs.CustomTabsIntent.Builder> customTabsIntent)
        Override the CustomTabsIntent that was prepared by the SDK.
        Parameters:
        customTabsIntent - Consumer that override the CustomTabsIntent, possibleUris (CustomTabManager.createTabBuilder(android.net.Uri...)) is pre-populated by the provided CustomTabsIntent
      • done

        public FRUser.Browser done()
        Finish up the AppAuth customization.