From 81b47b79881aac9933761ae998300be8b13d020f Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 24 Jan 2017 21:02:06 +0000 Subject: [PATCH] Declare PE_BADURL (#1142) --- .../lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm | 1 + .../t/32-Auth-and-issuer-OIDC-authorization_code.t | 2 ++ lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-hybrid.t | 2 ++ lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-implicit.t | 2 ++ 4 files changed, 7 insertions(+) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm index c1fad627a..7ba447044 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm @@ -4,6 +4,7 @@ use strict; use JSON; use Mouse; use Lemonldap::NG::Portal::Main::Constants qw( + PE_BADURL PE_CONFIRM PE_ERROR PE_LOGOUT_OK diff --git a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code.t b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code.t index 3fbc32eb7..c3d465bab 100644 --- a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code.t +++ b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-authorization_code.t @@ -15,12 +15,14 @@ my %handlerOR = ( op => [], rp => [] ); ok( $op = op(), 'OP portal' ); ok( $res = $op->_get('/oauth2/jwks'), 'Get JWKS, endpoint /oauth2/jwks' ); +expectOK($res); my $jwks = $res->[2]->[0]; ok( $res = $op->_get('/.well-known/openid-configuration'), 'Get metadata, endpoint /.well-known/openid-configuration' ); +expectOK($res); my $metadata = $res->[2]->[0]; count(3); diff --git a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-hybrid.t b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-hybrid.t index f3ad3f5f1..23162e550 100644 --- a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-hybrid.t +++ b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-hybrid.t @@ -15,12 +15,14 @@ my %handlerOR = ( op => [], rp => [] ); ok( $op = op(), 'OP portal' ); ok( $res = $op->_get('/oauth2/jwks'), 'Get JWKS, endpoint /oauth2/jwks' ); +expectOK($res); my $jwks = $res->[2]->[0]; ok( $res = $op->_get('/.well-known/openid-configuration'), 'Get metadata, endpoint /.well-known/openid-configuration' ); +expectOK($res); my $metadata = $res->[2]->[0]; count(3); diff --git a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-implicit.t b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-implicit.t index e49927cb2..2dcc2cf5a 100644 --- a/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-implicit.t +++ b/lemonldap-ng-portal/t/32-Auth-and-issuer-OIDC-implicit.t @@ -15,12 +15,14 @@ my %handlerOR = ( op => [], rp => [] ); ok( $op = op(), 'OP portal' ); ok( $res = $op->_get('/oauth2/jwks'), 'Get JWKS, endpoint /oauth2/jwks' ); +expectOK($res); my $jwks = $res->[2]->[0]; ok( $res = $op->_get('/.well-known/openid-configuration'), 'Get metadata, endpoint /.well-known/openid-configuration' ); +expectOK($res); my $metadata = $res->[2]->[0]; count(3);