From b634bc91c20cde337a5788c299b77b32a57edada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20OUDOT?= Date: Tue, 10 Jul 2018 18:53:40 +0200 Subject: [PATCH] token_type is case insensitive (#1474) --- .../lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;