Esempio n. 1
0
        public static void AddJwtAuth(this HttpConfiguration config, JwtOptions options)
        {
            var serializer = new TokenSerializer(options.Secret, options.Duration);
            var cookie     = new JwtCookie("auth-jwt");
            var signIn     = new JwtSignIn(serializer, cookie);

            JwtAuthResults.ISignIn = signIn;
            config.Filters.Add(new JwtAuthFilter(serializer, cookie));
        }
Esempio n. 2
0
 public JwtSignIn(TokenSerializer serializer, JwtCookie cookie)
 {
     this.serializer = serializer;
     this.cookie     = cookie;
 }
Esempio n. 3
0
 internal JwtAuthFilter(TokenSerializer tokenSerializer, JwtCookie cookie)
 {
     this.tokenSerializer = tokenSerializer;
     this.cookie          = cookie;
 }