@thermopylae/lib.user-session
Version:
Stateful implementation of the user session.
17 lines (16 loc) • 855 B
TypeScript
import { Exception } from '@thermopylae/lib.exception';
declare const enum ErrorCodes {
USER_SESSION_NOT_FOUND = "USER_SESSION_NOT_FOUND",
USER_SESSION_EXPIRED = "USER_SESSION_EXPIRED",
FORBIDDEN_ACCESS_TO_USER_SESSION_FROM_DIFFERENT_DEVICE = "FORBIDDEN_ACCESS_TO_USER_SESSION_FROM_DIFFERENT_DEVICE",
INVALID_SESSION_ID_LENGTH = "INVALID_SESSION_ID_LENGTH",
INVALID_IDLE_TIMEOUT = "INVALID_IDLE_TIMEOUT",
INVALID_RENEW_TIMEOUT = "INVALID_RENEW_TIMEOUT",
INVALID_OLD_SESSION_AVAILABILITY_TIMEOUT_AFTER_RENEWAL = "INVALID_OLD_SESSION_AVAILABILITY_TIMEOUT_AFTER_RENEWAL",
OLD_SESSION_AVAILABILITY_TIMEOUT_AFTER_RENEWAL_REQUIRED = "OLD_SESSION_AVAILABILITY_TIMEOUT_AFTER_RENEWAL_REQUIRED"
}
/**
* @private
*/
declare function createException(code: string, message: string): Exception;
export { createException, ErrorCodes };