Dancer2::Plugin::Auth::SAFE - Thomson Reuters SAFE SSO authentication plugin for Dancer2
version 0.002
With this plugin you can easily integrate Thomson Reuters SAFE SSO authentication into your application.
Add plugin configuration into your config.yml
plugins: Auth::SAFE: safe_url: "https://safe-test.thomson.com/login/sso/SSOService?app=app" shared_secret: "fklsjf5GlkKJ!gs/skf"
Define that a user must be logged in to access a route - and find out who is logged in with the logged_in_user keyword:
logged_in_user
use Dancer2::Plugin::Auth::SAFE; get '/users' => require_login sub { my $user = logged_in_user; return "Hi there, $user->{firstname}"; };
Used to wrap a route which requires a user to be logged in order to access it.
get '/profile' => require_login sub { .... };
Returns a hashref of details of the currently logged-in user, if there is one.
Konstantin Matyukhin <kmatyukhin@gmail.com>
Copyright (c) 2016 by Konstantin Matyukhin
This is a free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Dancer2::Plugin::Auth::SAFE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Plugin::Auth::SAFE
CPAN shell
perl -MCPAN -e shell install Dancer2::Plugin::Auth::SAFE
For more information on module installation, please visit the detailed CPAN module installation guide.