예제 #1
0
 public JwtAuthorizationContext(JwtAuthorizationOptions options, RemoteCallerContext remoteInvokeMessage)
 {
     Options             = options;
     Payload             = options.GetPayload();
     RemoteInvokeMessage = remoteInvokeMessage;
     if (remoteInvokeMessage.Paras.ContainsKey("username"))
     {
         UserName = remoteInvokeMessage.Paras["username"] + "";
     }
     if (remoteInvokeMessage.Paras.ContainsKey("password"))
     {
         Password = remoteInvokeMessage.Paras["password"] + "";
     }
     if (remoteInvokeMessage.Paras.ContainsKey("grant_type"))
     {
         GrantType = remoteInvokeMessage.Paras["grant_type"] + "";
     }
     Payload.Add("username", UserName);
 }
 public JwtAuthorizationMiddleware(ClientRequestDel next, JwtAuthorizationOptions options)
 {
     _options = options;
     _next    = next;
 }