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); }
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()); }
internal static string RedirectUri(this IAuthenticationOptions options) { return($"msal{options.ClientId}://auth"); }
internal static string GetPolicy(this IAuthenticationOptions options) { return(string.IsNullOrEmpty(options.Policy) ? "B2C_1_SUSI" : options.Policy); }
public UserDefinedConfiguration(IAuthenticationOptions options) { Options = options; }
public JwtTokenGeneratorService(IAuthenticationOptions applicationSettings) { _applicationSettings = applicationSettings; }
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; }