Commit a9b02986 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Fix using attributes (#1658)

parent 09996f98
...@@ -51,12 +51,12 @@ sub check { ...@@ -51,12 +51,12 @@ sub check {
unless ($token) { unless ($token) {
$self->userLogger->warn('CheckUser try without token'); $self->userLogger->warn('CheckUser try without token');
$msg = PE_NOTOKEN; $msg = PE_NOTOKEN;
$token = $self->ott->createToken( $req->sessionInfo ); $token = $self->ott->createToken( $req->userData );
} }
unless ( $self->ott->getToken($token) ) { unless ( $self->ott->getToken($token) ) {
$self->userLogger->warn('Checkuser try with expired/bad token'); $self->userLogger->warn('Checkuser try with expired/bad token');
$msg = PE_TOKENEXPIRED; $msg = PE_TOKENEXPIRED;
$token = $self->ott->createToken( $req->sessionInfo ); $token = $self->ott->createToken( $req->userData );
} }
return $self->p->sendHtml( return $self->p->sendHtml(
$req, $req,
...@@ -93,7 +93,7 @@ sub check { ...@@ -93,7 +93,7 @@ sub check {
LOGIN => $req->{user}, LOGIN => $req->{user},
TOKEN => ( TOKEN => (
$self->conf->{requireToken} $self->conf->{requireToken}
? $self->ott->createToken( $req->sessionInfo ) ? $self->ott->createToken( $req->userData )
: '' : ''
) )
} }
...@@ -202,7 +202,7 @@ sub check { ...@@ -202,7 +202,7 @@ sub check {
GROUPS => $array_attrs->[0], GROUPS => $array_attrs->[0],
TOKEN => ( TOKEN => (
$self->conf->{requireToken} $self->conf->{requireToken}
? $self->ott->createToken( $req->sessionInfo ) ? $self->ott->createToken( $req->userData )
: '' : ''
) )
} }
...@@ -228,7 +228,7 @@ sub display { ...@@ -228,7 +228,7 @@ sub display {
), ),
TOKEN => ( TOKEN => (
$self->conf->{requireToken} $self->conf->{requireToken}
? $self->ott->createToken( $req->sessionInfo ) ? $self->ott->createToken( $req->userData )
: '' : ''
) )
} }
...@@ -270,9 +270,8 @@ sub _authorization { ...@@ -270,9 +270,8 @@ sub _authorization {
last; last;
} }
} }
return $exist return $exist
? $self->p->HANDLER->grant( $req, $req->{sessionInfo}, $appuri, ? $self->p->HANDLER->grant( $req, $req->{userData}, $appuri,
undef, $vhost ) undef, $vhost )
: -1; : -1;
} }
...@@ -283,7 +282,7 @@ sub _headers { ...@@ -283,7 +282,7 @@ sub _headers {
$vhost =~ s/:\d+$//; $vhost =~ s/:\d+$//;
$req->{env}->{HTTP_HOST} = $vhost; $req->{env}->{HTTP_HOST} = $vhost;
$self->p->HANDLER->headersInit( $self->{conf} ); $self->p->HANDLER->headersInit( $self->{conf} );
return $self->p->HANDLER->checkHeaders( $req, $req->{sessionInfo} ); return $self->p->HANDLER->checkHeaders( $req, $req->{userData} );
} }
sub _splitAttributes { sub _splitAttributes {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment