The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojolicious::Plugin::Authentication::OIDC::Controller::OpenIDConnect - controller endpoints for OpenID Connect authentication

DESCRIPTION

This is a simple mojolicious controller that implements the endpoints necessary for OpenID Connect authentication. These endpoints must be registered as routes to function, which can be done implicity by "make_routes" in Mojolicious::Plugin::Authentication::OIDC

METHODS

Mojolicious::Plugin::Authentication::OIDC::Controller::OpenIDConnect inherits all methods from Mojolicious::Controller and implements the following new ones

redirect

Returns an HTTP 302, redirecting the client to the auhorization server's authorization_endpoint with the proper parameters populated for an openid code response, and then to redirect to "login"

login

Contacts the authorization server to receive an access token for the OpenID authenticated user. Calls the "on_success" in Mojolicious::Plugin::Authentication::OIDC or "on_error" in Mojolicious::Plugin::Authentication::OIDC handles, as apprporiate.

AUTHOR

Mark Tyrrell <mark@tyrrminal.dev>

LICENSE

Copyright (c) 2024 Mark Tyrrell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.