NAME Browser::OIDC - Get an OIDC token for a CLI application SYNOPSIS my $oidc = Browser::OIDC->new_from_discovery($base_url, client_id => 'me'); my ($token, $ticket) = $oidc->get_authorization(scope => 'email'); my $tokens = $authorization->get_tokens; $tokens->validate_id_token($ticket); DESCRIPTION This module will open a browser for you to log into some OIDC metadata, and will temporarily run a webserver on localhost to receive the redirect with the results from your browser. METHODS new_from_discovery my $oidc = Browser::OIDC->new($base_url); This creates a new Browser::OIDC object. This will fetch the configuration for the given $base_url. It's named arguments include: client_id The client identifier. Mandatory. client_secret The client secret, if any. new_from_config my $oidc = Browser::OIDC->new($config); This creates a new Browser::OIDC object. This use a OIDC discovery configuration instead of fetching it. It takes the same named arguments as new_from_config. get_authorization This override takes the following additional arguments: display ASCII string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page, popup, touch, and wap. prompt Case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for reauthentication and consent. The defined values are: none, login, consent, and select_account. max_age Maximum Authentication Age. Specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated by the OP. Note that max_age=0 is equivalent to prompt=login. login_hint Hint to the Authorization Server about the login identifier the End-User might use to log in (if necessary). AUTHOR Leon Timmermans COPYRIGHT AND LICENSE This software is copyright (c) 2026 by Leon Timmermans. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.