private static JWTResponseToken GetResponseToken(bool allowRefreshToken, string accessToken, JWTClient client) { var token = new JWTResponseToken { AccessToken = accessToken, AccessTokenTimeout = JWTContansts.AccessTokenTimeout, RefreshTokenTimeout = JWTContansts.RefreshTokenTimeout }; if (allowRefreshToken) { token.RefreshToken = client.LastRefreshToken; } return(token); }
public async Task CreateClientAsync(JWTClient client) { _context.Set <JWTClient>().Add(client); await _context.SaveChangesAsync(); }