|
|
|
@ -41,9 +41,15 @@ ok( $h{'Auth-User'} eq 'dwho', 'Header Auth-User is set to "dwho"' ) |
|
|
|
|
count(1); |
|
|
|
|
|
|
|
|
|
# Request an URI protected by custom function -> allowed |
|
|
|
|
ok( $res = $client->_get( '/test-uri1/dwho', undef, undef, "lemonldap=$sessionId" ), |
|
|
|
|
ok( $res = $client->_get( '/test-restricted_uri/dwho/', undef, undef, "lemonldap=$sessionId" ), |
|
|
|
|
'Authentified query' ); |
|
|
|
|
ok( $res->[0] == 200, '/test-uri1 -> Code is 200' ) or explain( $res, 200 ); |
|
|
|
|
ok( $res->[0] == 200, '/test-restricted_uri -> Code is 200' ) or explain( $res, 200 ); |
|
|
|
|
count(2); |
|
|
|
|
|
|
|
|
|
# Request an URI protected by custom function -> denied |
|
|
|
|
ok( $res = $client->_get( '/test-restricted_uri/dwho', undef, undef, "lemonldap=$sessionId" ), |
|
|
|
|
'Denied query' ); |
|
|
|
|
ok( $res->[0] == 403, '/test-restricted_uri -> Code is 403' ) or explain( $res->[0], 403 ); |
|
|
|
|
count(2); |
|
|
|
|
|
|
|
|
|
# Request an URI protected by custom function -> allowed |
|
|
|
|