NAME
PAGI::FastAPI::Security::Base - Internal base class for PAGI::FastAPI::Security schemes
VERSION
Version v0.0.6
DESCRIPTION
Main usage. This will provide you with the common depends() wiring and 401/403 failure helpers on which PAGI::FastAPI::Security::HTTPBearer, PAGI::FastAPI::Security::HTTPBasic, PAGI::FastAPI::Security::APIKey, and PAGI::FastAPI::Security::OAuth2::PasswordBearer are based.
Concrete classes will have to implemente _extract($c), which will have to return extracted credential value/structure on success, or undef on failure.
depends(%opts)
Returns a PAGI::FastAPI::Depends object suitable for a route's dependencies list. %opts supports the same key option as Depends() itself.
dependencies => [ $scheme->depends(key => 'token') ],
challenge_header
my ($key, $value) = $security->challenge_header;
$c->set_header($security->challenge_header);
Generates a key-value pair suitable for setting a WWW-Authenticate HTTP header on authentication failure responses in accordance with RFC 9110.
Returns a two-element array ('WWW-Authenticate', $challenge_string).
%args- (Optional) Additional parameters passed to format scheme-specific challenges.
By default, this method constructs a basic challenge string using the class scheme and the configured realm option:
WWW-Authenticate: <Scheme> realm="<realm>"
AUTHOR
Mohammad Sajid Anwar, <mohammad.anwar at yahoo.com>
REPOSITORY
https://github.com/manwar/PAGI-FastAPI-Security
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/manwar/PAGI-FastAPI-Security/issues. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc PAGI::FastAPI::Security::Base
You can also look for information at:
BUG Report
Search MetaCPAN
LICENSE AND COPYRIGHT
Copyright (C) 2026 Mohammad Sajid Anwar.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License (2.0). You may obtain a copy of the full license at: