public RevocationController(IConfiguration configuration, IEncryptionService encryption, ITokenService tokenService, ITokenService refrshService, ITSLogger tSLogger, ITokenServiceDbContext tokenServiceDbContext) { _configuration = configuration; _encryptionService = encryption; _tokenService = tokenService; _refreshService = refrshService; _tSLogger = tSLogger; _tokenServiceDbContext = tokenServiceDbContext; }
public void Setup() { Guid userId = Guid.Parse("71264886-e911-4f71-a9f7-e850967122fd"); Guid clientId = Guid.Parse("29bfd4b1-81c0-4db3-a615-4422d08f9792"); configuration = TestHelper.GetIConfigurationRoot(TestContext.CurrentContext.TestDirectory); var options = new DbContextOptionsBuilder <Infrastructure.Models.OAuthContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; context = new Infrastructure.Models.OAuthContext(options); context.User.Add(new User { UserId = userId, UserName = "******", Salt = "pgsoAvSXD3xYPV+/pSAe3khYZWOFidHPxpltwNDP4Xw=", HashPassword = "******" }); context.Authorize.Add(new Authorize { Client_Id = clientId, Code = "pgsoAvSXD3xYPV+/pSAe3khYZWOFidHPxpltwNDP4Xw=", UserId = userId, Scope = "photos", ID = 0 }); context.SaveChanges(); }
public RegisterClient(ITokenService refreshtoken, IConfiguration configuration, ITSLogger log, ITokenService jWTTokenService, ITokenServiceDbContext oauth, IEncryptionService encryptSvc) : base(refreshtoken, configuration, log, jWTTokenService, oauth, encryptSvc) { }
public AuthenticateRefresh(ITokenService refreshtoken, IConfiguration configuration, ITSLogger log, ITokenService jWTTokenService, ITokenServiceDbContext oauth, IEncryptionService encryptSvc) : base(refreshtoken, configuration, log, jWTTokenService, oauth, encryptSvc) { }