NAME
Net::Async::Keycloak::Auth - Get and keep a valid admin token for the Keycloak Admin API, asynchronously
VERSION
version 0.001
SYNOPSIS
my $auth = Net::Async::Keycloak::Auth->new(
http => $http,
token_endpoint => 'https://id.example.org/realms/master/protocol/openid-connect/token',
username => 'admin',
password => $password,
);
my $bearer = await $auth->token_f;
DESCRIPTION
The asynchronous WWW::Keycloak::Auth: same login options, same renewal rules, futures instead of values. Callers asking for a token while a login is under way share that login instead of starting their own.
http
Required. The Net::Async::HTTP to use.
token_endpoint
username
password
client_id
client_secret
token
As in WWW::Keycloak::Auth.
margin
now
As in WWW::Keycloak::Auth.
token_f
my $bearer = await $auth->token_f;
A future of a token that is valid for at least margin more seconds.
invalidate
$auth->invalidate($refused_token);
As in WWW::Keycloak::Auth. Given the token that was refused, it forgets the current token only if that is still the one; requests that were refused together then cause one new login, not one each.
renewable
As in WWW::Keycloak::Auth.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-net-async-keycloak/issues.
IRC
Join #kubernetes on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.