/// <summary> /// Initializes a new <see cref="SuperOfficeAuthenticationOptions"/>. Default environment is Development (SOD). /// </summary> public SuperOfficeAuthenticationOptions() { Environment = SuperOfficeAuthenticationEnvironment.Development; CallbackPath = SuperOfficeAuthenticationDefaults.CallbackPath; Scope.Add("openid"); ClaimActions.MapJsonKey(ClaimTypes.Name, SuperOfficeAuthenticationConstants.PrincipalNames.FullName); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.ClaimNames.AssociateId, SuperOfficeAuthenticationConstants.PrincipalNames.AssociateId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.ClaimNames.Email, SuperOfficeAuthenticationConstants.PrincipalNames.EmailAddress); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.ClaimNames.UserPrincipalName, SuperOfficeAuthenticationConstants.PrincipalNames.Associate); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.BusinessId, SuperOfficeAuthenticationConstants.PrincipalNames.BusinessId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.CategoryId, SuperOfficeAuthenticationConstants.PrincipalNames.CategoryId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.ContactId, SuperOfficeAuthenticationConstants.PrincipalNames.ContactId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.ContextIdentifier, SuperOfficeAuthenticationConstants.PrincipalNames.DatabaseContextIdentifier); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.CountryId, SuperOfficeAuthenticationConstants.PrincipalNames.CountryId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.GroupId, SuperOfficeAuthenticationConstants.PrincipalNames.GroupId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.HomeCountryId, SuperOfficeAuthenticationConstants.PrincipalNames.HomeCountryId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.PersonId, SuperOfficeAuthenticationConstants.PrincipalNames.PersonId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.RoleName, SuperOfficeAuthenticationConstants.PrincipalNames.RoleName); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.RoleId, SuperOfficeAuthenticationConstants.PrincipalNames.RoleId); ClaimActions.MapJsonKey(SuperOfficeAuthenticationConstants.PrincipalNames.SecondaryGroups, SuperOfficeAuthenticationConstants.PrincipalNames.SecondaryGroups); // Add a custom claim action to map FunctionRights to claims ClaimActions.Add(new SuperOfficeFunctionalRightsClaimAction(this)); }
/// <summary> /// Initializes a new instance of the <see cref="AppleAuthenticationOptions"/> class. /// </summary> public AppleAuthenticationOptions() { ClaimsIssuer = AppleAuthenticationDefaults.Issuer; CallbackPath = AppleAuthenticationDefaults.CallbackPath; AuthorizationEndpoint = AppleAuthenticationDefaults.AuthorizationEndpoint; TokenEndpoint = AppleAuthenticationDefaults.TokenEndpoint; Events = new AppleAuthenticationEvents(); Scope.Add("name"); Scope.Add("email"); // Add a custom claim action that maps the email claim from the ID token if // it was not otherwise provided in the user endpoint response. // See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/issues/407 ClaimActions.Add(new AppleEmailClaimAction(this)); }