NAME
Airlock::Result - Outcome of an Airlock operation
VERSION
version 0.001
SYNOPSIS
my $result = $airlock->redeem( device_code => $device_code, client_id => $client_id );
if ( $result->ok ) { my $token = $result->data->{access_token} }
else { warn $result->status }
my ( $http_status, $json ) = @{ $result->oauth };
DESCRIPTION
Every Airlock operation that can fail for an ordinary reason returns one of these instead of throwing. Exceptions are kept for programming errors.
ok
True when the operation did what was asked.
status
What happened, as one word. On failure this is the OAuth error code where one exists (authorization_pending, slow_down, access_denied, expired_token, invalid_grant, invalid_client, invalid_scope, invalid_request) or an Airlock reason (unknown_code, factor_required, factor_unavailable, factor_failed, too_many_failures, reauth_required).
data
The payload of a success: the device authorization response after open, the token response after redeem.
missing
Names of the factors an approval still needs or that did not hold.
oauth
my ( $http_status, $json ) = @{ $result->oauth };
The result as RFC 8628 wants it on the wire: 200 with the payload, or 400 with error.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-airlock/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.