public AuthenticationMessageHandler(ITokenCreator tokenCreator, IOptions <TokenCreatorConfiguration> options)
        {
            this.tokenCreator = tokenCreator ?? throw new ArgumentNullException(nameof(tokenCreator));
            _ = options ?? throw new ArgumentNullException(nameof(tokenCreator));

            tokenCreatorConfiguration = options.Value;
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="helper">Helps this instance</param>
 /// <param name="cilBody">The CIL method body</param>
 /// <param name="keepMaxStack">Keep the original max stack value that has been initialized
 /// in <paramref name="cilBody"/></param>
 public MethodBodyWriter(ITokenCreator helper, CilBody cilBody, bool keepMaxStack)
     : base(cilBody.Instructions, cilBody.ExceptionHandlers)
 {
     this.helper       = helper;
     this.cilBody      = cilBody;
     this.keepMaxStack = keepMaxStack;
 }
Exemplo n.º 3
0
 public SecurityService(
     IUnitOfWork unitOfWork, 
     ITokenCreator tokenCreator)
 {
     _unitOfWork = unitOfWork;
     _tokenCreator = tokenCreator;
 }
Exemplo n.º 4
0
 public TokenController(UserManager <ApplicationUser> userManager, IOptions <AppSettings> appSettings,
                        AppDbContext db, ITokenCreator tokenCreator)
 {
     _userManager  = userManager;
     _appSettings  = appSettings.Value;
     _db           = db;
     _tokenCreator = tokenCreator;
 }
Exemplo n.º 5
0
 public AuthenticationService(
     IUnitOfWork unitOfWork,
     IEncryptionService encryptionService,
     ITokenCreator tokenCreator
     )
 {
     _unitOfWork        = unitOfWork;
     _encryptionService = encryptionService;
     _tokenCreator      = tokenCreator;
 }
Exemplo n.º 6
0
 private Login(ITokenRepository tokenRepository, IUserRepository userRepository, ITokenCreator tokenCreator, string appKey, string userName, string password, string device)
 {
     _tokenRepository = tokenRepository;
     _userRepository  = userRepository;
     _appKey          = appKey;
     _userName        = userName;
     _password        = password;
     _tokenCreator    = tokenCreator;
     _device          = device;
     ValidateInstance();
     InvalidUsernameOrPasswordExceptionCreator = () => InvalidUsernameOrPasswordException.Create(_userName, _appKey);
 }
Exemplo n.º 7
0
 public OCRInterpreter(ITokenLineCreator tokenLineCreator, ITokenCreator tokenCreator, TokenInterpreter tokenInterpreter)
 {
     _tokenLineCreator = tokenLineCreator;
     _tokenCreator     = tokenCreator;
     _tokenInterpreter = tokenInterpreter;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="helper">Helps this instance</param>
 /// <param name="cilBody">The CIL method body</param>
 public MethodBodyWriter(ITokenCreator helper, CilBody cilBody)
     : this(helper, cilBody, false)
 {
 }
Exemplo n.º 9
0
 public LoginCommandHandler(IAccountRepository accountRepository, ITokenCreator tokenCreator, IUserStatusVerification userStatusVerification)
 {
     _accountRepository      = accountRepository;
     _tokenCreator           = tokenCreator;
     _userStatusVerification = userStatusVerification;
 }
 public MicrosoftGraphRepository(ITokenCreator tokenCreator)
 {
     this.tokenCreator = tokenCreator ?? throw new ArgumentNullException(nameof(tokenCreator));
 }
Exemplo n.º 11
0
 internal MethodBodyWriter(ITokenCreator helper)
 {
     this.helper = helper;
 }
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="helper">Helps this instance</param>
		/// <param name="cilBody">The CIL method body</param>
		public MethodBodyWriter(ITokenCreator helper, CilBody cilBody)
			: this(helper, cilBody, false) {
		}
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="helper">Helps this instance</param>
		/// <param name="cilBody">The CIL method body</param>
		/// <param name="keepMaxStack">Keep the original max stack value that has been initialized
		/// in <paramref name="cilBody"/></param>
		public MethodBodyWriter(ITokenCreator helper, CilBody cilBody, bool keepMaxStack)
			: base(cilBody.Instructions, cilBody.ExceptionHandlers) {
			this.helper = helper;
			this.cilBody = cilBody;
			this.keepMaxStack = keepMaxStack;
		}
Exemplo n.º 14
0
 public static async Task <string> Execute(ITokenRepository tokenRepository,
                                           IUserRepository userRepository, ITokenCreator tokenCreator, string appKey, string userName, string password, string device) =>
 await new Login(tokenRepository, userRepository, tokenCreator, appKey, userName, password, device).Do();