public JwtAuthorizationContext(JwtAuthorizationOptions options, RemoteCallData 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"] + ""; } if (!string.IsNullOrEmpty(UserName)) { Payload.Add("username", UserName); } }
public JwtAuthorizationMiddleware(RequestDel next, JwtAuthorizationOptions options, ISerializer serializer) { _options = options; _serializer = serializer; _next = next; }