예제 #1
0
        public static CustomAuthnClient CreateAuthenticationClient(IAppSettingsHelper appSettingsHelper)
        {
            string urlDetails = appSettingsHelper.GetBaseUrl();

            if (urlDetails != null)
            {
                OktaClientConfiguration oktaClientConfiguration = new OktaClientConfiguration
                {
                    OktaDomain = urlDetails,
                };
                var customClientParams = GetDefaultCustomClientParams(oktaClientConfiguration);
                CustomAuthnClient customAuthnClient = new CustomAuthnClient(customClientParams.Item1, customClientParams.Item2, customClientParams.Item3);
                return(customAuthnClient);
            }
            else
            {
                throw new Exception("Could not reach out registry to get okta base URL");
            }
        }