Catalyst-Plugin-OAuth2-AuthorizationServer

 view release on metacpan or  search on metacpan

t/server-dcr.t  view on Meta::CPAN

    });
    is( $ok->{token_endpoint_auth_method}, 'none',
        'the advertised token_endpoint_auth_method is accepted' );
}

# grant_types: metadata advertises authorization_code + refresh_token
{
    my $e = exception {
        engine->register_client({
            redirect_uris => ['https://app.example/cb'],
            grant_types   => [ 'authorization_code', 'client_credentials' ],
        });
    };
    is( $e->error, 'invalid_client_metadata', 'unadvertised grant_type rejected' );

    my $ok = engine->register_client({
        redirect_uris => ['https://app.example/cb'],
        grant_types   => [ 'authorization_code', 'refresh_token' ],
    });
    is_deeply( $ok->{grant_types}, [ 'authorization_code', 'refresh_token' ],
        'advertised grant_types accepted' );



( run in 1.998 second using v1.01-cache-2.11-cpan-007c89162af )