Mercurial > prosody-modules
view mod_lib_ldap/dev/t/00-login.t @ 5559:d7fb8b266663
mod_http_oauth2: Strip unknown client metadata
Per RFC 7591
> The authorization server MUST ignore any client metadata sent by the
> client that it does not understand (for instance, by silently removing
> unknown metadata from the client's registration record during
> processing).
This was previously done but unintentionally removed in 90449babaa48
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 20 Jun 2023 01:11:34 +0200 |
parents | 512e31cd8b70 |
children |
line wrap: on
line source
use strict; use warnings; use lib 't'; use TestConnection; use Test::More; my @users = ( 'one', 'two', 'three', 'four', 'five', 'six', ); plan tests => scalar(@users) + 3; foreach my $username (@users) { my $conn = TestConnection->new($username); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok(! $error) or diag("$username login failed: $error"); } do { my $conn = TestConnection->new('one', password => '23451'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); }; do { my $conn = TestConnection->new('invalid', password => '12345'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); }; do { my $conn = TestConnection->new('seven', password => '1234567'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); };