예제 #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;
 }