token_type is case insensitive (#1474)

This commit is contained in:
Clément OUDOT 2018-07-10 18:53:40 +02:00
parent c118a60c1e
commit b634bc91c2

View File

@ -446,7 +446,7 @@ sub checkTokenResponseValidity {
my ( $self, $json ) = @_;
# token_type MUST be Bearer
unless ( $json->{token_type} eq "Bearer" ) {
unless ( $json->{token_type} =~ /^Bearer$/i ) {
$self->logger->error(
"Token type is " . $json->{token_type} . " but must be Bearer" );
return 0;