String token = getHeaderParameter(request);
if (token == null) {
logger.debug("Header Authorization token is null, throw exception.");
throw new AuthenticationException(ErrorMessages.INVALID_CREDENTIAL);
}
return new GatewayAuthenticaionToken(token);
}