Exemplo n.º 1
0
 public JwtAuthorizationContext(JwtAuthorizationOptions options, JimuRemoteCallData remoteInvokeMessage)
 {
     Options             = options;
     Payload             = options.GetPayload();
     RemoteInvokeMessage = remoteInvokeMessage;
     if (remoteInvokeMessage.Parameters.ContainsKey("username"))
     {
         UserName = remoteInvokeMessage.Parameters["username"] + "";
     }
     if (remoteInvokeMessage.Parameters.ContainsKey("password"))
     {
         Password = remoteInvokeMessage.Parameters["password"] + "";
     }
     Payload.Add("username", UserName);
 }
Exemplo n.º 2
0
 public JwtAuthorizationMiddleware(RequestDel next, JwtAuthorizationOptions options, ISerializer serializer)
 {
     _options    = options;
     _serializer = serializer;
     _next       = next;
 }