diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm index 0a41f007a..0c5256ff1 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm @@ -17,11 +17,43 @@ use Mouse; our $VERSION = '2.0.0'; +extends 'Lemonldap::NG::Portal::Main::Plugin'; + +has server => ( is => 'rw' ); + # INITIALIZATION sub init { my ($self) = @_; + eval { require Lemonldap::NG::Common::PSGI::SOAPServer }; + if ($@) { + $self->error($@); + return 0; + } + $self->server( Lemonldap::NG::Common::PSGI::SOAPServer->new ); + $self->addUnauthRoute( sessions => 'unauthSessions', ['POST'] ); + $self->addUnauthRoute( adminSessions => 'unauthAdminSessions', ['POST'] ); + $self->addUnauthRoute( config => 'config', ['POST'] ); + $self->addAuthRoute( sessions => 'badSoapRequest' ['POST'] ); + $self->addAuthRoute( adminSessions => 'badSoapRequest', ['POST'] ); + $self->addAuthRoute( config => 'badSoapRequest' ['POST'] ); 1; } +sub unauthSessions { + my ( $self, $req ) = @_; +} + +sub unauthAdminSessions { + my ( $self, $req ) = @_; +} + +sub config { + my ( $self, $req ) = @_; +} + +sub badSoapRequest { + my ( $self, $req ) = @_; +} + 1;