Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Plugins.Add(new AuthFeature(() => new CustomUserSession(),
- new IAuthProvider[]
- {
- new BasicAuthProvider(), //Sign-in with HTTP Basic Auth
- new JwtAuthProvider(AppSettings) {
- AuthKeyBase64 = AppSettings.GetString("jwt.auth.key"),
- RequireSecureConnection = false,
- }, //JWT TOKENS
- new CredentialsAuthProvider(AppSettings)
- })
- {
- public IUserAuth UserAuth
- {
- get
- {
- var session = SessionAs<AuthUserSession>();
- return AuthRepository.GetUserAuth(session.UserAuthId);
- }
- }
- }
Add Comment
Please, Sign In to add comment