NAME

WWW::Suffit::Server::Auth - The authentication and authorization Suffit API controller

SYNOPSIS

use WWW::Suffit::Server::Auth;

DESCRIPTION

The authentication and authorization Suffit API controller

METHODS

List of authorization/authentication methods

authorize

$c->routes->post('/authorize')->to('auth#authorize'
  => {token_type => 'session'});
$c->routes->post('/authorize')->to('auth#authorize'
  => {token_type => 'access'});
$c->routes->post('/authorize')->to('auth#authorize'
  => {token_type => 'api'});

The authorization controller by stashed parameters

See "POST /authorize" in WWW::Suffit::API

is_authorized

my $authorized = $c->routes->under('/api')->to('auth#is_authorized')
     ->name('api');

The API Authorization checker. If use `init_api_routes` startup option then this route will be exists by default. To get access to this route use:

my $authorized = $r->lookup('api');

is_authorized_api

See "is_authorized"

HISTORY

See Changes file

TO DO

See TODO file

SEE ALSO

WWW::Suffit::Server

AUTHOR

Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2023 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See LICENSE file and https://dev.perl.org/licenses/