Microsoft.AspNet.Identity.Owin 扩展,以更轻松地获取标识的用户名/用户 ID 声明。 如果存在具有指定类型的声明,则返回第一个声明的声明值;否则返回 null。 返回 使用 UserIdClaimType 返回用户 ID。 返回 使用 UserNameClaimType 返回用户名。 返回 Owin aware identity manager that adds sign in/sign out and claims functionality Constructor Constructor that uses the default settings Authentication APIs (SignIn, SignOut) Authentication APIs (SignIn/SignOut) Constructor Validates that the password matches and then signs the token in If the token is found, allows the user to sign in Create an external user and sign them in Creates a claims identity with the ApplicationAuthenticaitonType, UserNameClaimType and ConfigRole type Return the identity associated with the default external authentication type Return the claims for a token, which will contain the UserIdClaimType, UserNameClaimType, a claim representing each Role and any claims specified in the UserClaims Try to link the given identity to the specified token IdentityManager for operations Config Create a token for the specified user and disables sign in. ConfirmSignInTokenAsync will confirm this token and reenable sign in. Signs in the active principal with a identity that contains claims set to the result of GetUserIdentityClaims and the specified claims Signs the identity in if the external identity is already linked Set the AllowSignIn flag for a user Authentication APIs (SignIn/SignOut) Validates that the password matches and then signs the token in If the token is found, allows the user to sign in Create an external user and sign them in Creates a claims identity with the ApplicationAuthenticaitonType, UserNameClaimType and ConfigRole type Return the identity associated with the default external authentication type Return the claims for a token, which will contain the UserIdClaimType, UserNameClaimType, a claim representing each Role and any claims specified in the UserClaims Try to link the given identity to the specified token Require a call to ConfirmSignInToken with the given token before this user can be signed in Signs in the active principal with a identity that contains claims set to the result of GetUserIdentityClaims and the specified claims Signs the identity in if the external identity is already linked Set the AllowSignIn flag for a user Adds extensions methods related to SignIn using OWIN middleware and the IdentityManager to generate the appropriate user claims Configuration for the Identity system Default constructor which uses the built in default options The AuthenticationType used in the UseSignInCookies extension method for the active signed in identity. Issuer used for the claims generated The AuthenticationType used by the UseSignInCookies extension method for the external signed in identity. Path to the login page in the app Path to the logout page in the app Claim type used for role claims Claim type used for the user id Claim type used for the user name Represents the extensions used in identity settings. Returns the authentication options for the identity. The authentication options for the identity. The identity settings. Extensions methods on IAuthenticationManager that add methods for using the default Application and External authentication type constants Return the authentication types which are considered external because they have captions Extensions off of IAppBuilder to make it easier to configure the SignInCookies Configure the app to use owin middleware based cookie authentication for external identities Configure the app to use owin middleware based cookie authentication for external identities Configure the app to use owin middleware based oauth bearer tokens Use application and external sign in cookies for the app Configure the app to use owin middleware based cookie authentication for the active identity and external identities