You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
885 B
46 lines
885 B
# This module implements all the methods that responds to '/api/*' requests
|
|
package Lemonldap::NG::Manager::Api;
|
|
|
|
use 5.10.0;
|
|
use utf8;
|
|
use Mouse;
|
|
|
|
extends 'Lemonldap::NG::Common::Conf::RESTServer';
|
|
|
|
use Lemonldap::NG::Manager::Api::2F;
|
|
use Lemonldap::NG::Manager::Api::Providers;
|
|
|
|
our $VERSION = '2.0.7';
|
|
|
|
#############################
|
|
# I. INITIALIZATION METHODS #
|
|
#############################
|
|
|
|
use constant defaultRoute => 'api.html';
|
|
|
|
sub addRoutes {
|
|
my ( $self, $conf ) = @_;
|
|
|
|
# HTML template
|
|
$self->addRoute( 'api.html', undef, ['GET'] )
|
|
|
|
->addRoute(
|
|
api => {
|
|
v1 => {
|
|
hello => "helloworld",
|
|
},
|
|
},
|
|
['GET']
|
|
)
|
|
|
|
->addRoute(
|
|
providers => {
|
|
oidc => {
|
|
rp => { ':confKey' => 'getOidcRpByConfKey' },
|
|
},
|
|
},
|
|
['GET']
|
|
);
|
|
}
|
|
|
|
1;
|
|
|