Ejemplo n.º 1
0
        internal static string[] GetScopes(this IAuthenticationOptions options)
        {
            if (options.Scopes is null || options.Scopes.Length == 0)
            {
                return(new[] { $"https://{options.Tenant.GetFullyQualifiedTenantName()}/mobile/read" });
            }

            return(options.Scopes);
        }
Ejemplo n.º 2
0
        public static string GetTenant(this IAuthenticationOptions options)
        {
            var domainParts = options.Tenant.Split('.');

            if (domainParts.Length == 1)
            {
                return($"{options.Tenant.ToLower()}.onmicrosoft.com");
            }

            return(options.Tenant.ToLower());
        }
Ejemplo n.º 3
0
 internal static string RedirectUri(this IAuthenticationOptions options)
 {
     return($"msal{options.ClientId}://auth");
 }
Ejemplo n.º 4
0
 internal static string GetPolicy(this IAuthenticationOptions options)
 {
     return(string.IsNullOrEmpty(options.Policy) ? "B2C_1_SUSI" : options.Policy);
 }
 public UserDefinedConfiguration(IAuthenticationOptions options)
 {
     Options = options;
 }
Ejemplo n.º 6
0
 public JwtTokenGeneratorService(IAuthenticationOptions applicationSettings)
 {
     _applicationSettings = applicationSettings;
 }
Ejemplo n.º 7
0
 public static string GetB2CAuthority(this IAuthenticationOptions options, string policy)
 {
     return($"https://login.microsoftonline.com/tfp/{options.GetTenant()}/{policy}");
 }
 public AuthenticationService(IAuthenticationOptions authenticationOptions, ILogger logger, IPublicClientApplication publicClientApplication)
 {
     Options    = authenticationOptions;
     Logger     = logger;
     AuthClient = publicClientApplication;
 }