示例#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);
 }
示例#2
0
 public JwtAuthServerModule(IConfigurationRoot jimuAppSettings) : base(jimuAppSettings)
 {
     _options = jimuAppSettings.GetSection(typeof(JwtAuthorizationOptions).Name).Get <JwtAuthorizationOptions>();
 }
示例#3
0
 public JwtAuthorizationMiddleware(RequestDel next, JwtAuthorizationOptions options, IContainer container)
 {
     _options   = options;
     _next      = next;
     _container = container;
 }