Claims provider
ClaimsProvider extracts options/preferences from user claims. It has save and auto-create capabilities.
Its Prefix
must be passed in the constructor, and it is Enabled
only when the user is logged in.
Below the list of all provider specific properties:
public string SourcePrefix { get; set; }
public bool PersistentSignIn { get; set; }
public string AuthenticationMethod { get; set; }
With:
- SourcePrefix
-
Prefix all claims must have, to be processed by the provider. This prefix is removed before
each field name is concatenated with
Prefix
to get the final path in the request dictionary. Since claim names usually have an URI format like: "http://www.mvc-controls.com/Welcome", for instance, once extracted from claims paths have their / replaced by dots. The inverse operation is performed before saving back settings into claims. - PersistentSignIn
- Declares if persistent sign in must be used when re-logging after an user claims modification
- AuthenticationMethod
- Declares the authentication method name to use when re-logging after an user claims modification
Both PersistentSignIn and AuthenticationMethod are the standard parameters usually passed to the SignInAsync method of the SignInManager. See here for an introduction to authentication and SignInManager.