class BasicAuthenticationService extends StatelessService {

    protected long getExpirationTime(AuthenticationRequest authRequest) {
        long expirationTimeSeconds = authRequest.sessionExpirationSeconds != null ?
                authRequest.sessionExpirationSeconds : AUTH_TOKEN_EXPIRATION_SECONDS;

        // Set a hard limit on the duration of a session if the expirationTimeMicros
        // exceeds the upper session expiration limit.
        if (this.UPPER_SESSION_LIMIT_SECONDS > 0 &&
                expirationTimeSeconds > this.UPPER_SESSION_LIMIT_SECONDS) {
            expirationTimeSeconds = this.UPPER_SESSION_LIMIT_SECONDS;
        }

        return Utils.fromNowMicrosUtc(TimeUnit.SECONDS.toMicros(expirationTimeSeconds));
    }

    public  BasicAuthenticationService();

}