Пример #1
0
        public async Task Setup()
        {
            var authResponse = await AccountBuilder.Authenticate(Client, Account.Email);

            _response = await Client.PostObject("/accounts/revoke-token", new RevokeTokenRequest()
            {
                Token = authResponse.RefreshToken
            });
        }
Пример #2
0
        public async Task Setup()
        {
            var account = AccountBuilder.Verified().Build();
            var auth    = await AccountBuilder.Authenticate(Client, account.Email);

            AuthenticateClientWithToken(auth.JwtToken);
            var _oldToken = auth.RefreshToken;

            DatabaseConnection.RevokeRefreshToken(_oldToken);
            _response = await Client.PostObject("/accounts/refresh-token", new RefreshTokenRequest { RefreshToken = RandomData.String });
        }
Пример #3
0
        public async Task Setup()
        {
            var library = LibraryBuilder.Build();
            var account = AccountBuilder.As(Domain.Models.Role.Admin).Verified().InLibrary(library.Id).Build();

            _authResponse = await AccountBuilder.Authenticate(Client, account.Email);

            AuthenticateClientWithToken(_authResponse.JwtToken);

            _response = await Client.PostObject("/accounts/refresh-token", new RefreshTokenRequest { RefreshToken = _authResponse.RefreshToken });

            _refreshResponse = await _response.GetContent <AuthenticateResponse>();
        }