diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm index 1171504ac..c58601513 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm @@ -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;