« blib/lib/Lemonldap/NG/Portal/Issuer/Get.pm
↑ Summary
blib/lib/Lemonldap/NG/Portal/2F/Register/Password.pm »
| 1 | package Lemonldap::NG::Portal::Lib::OIDCTokenExchange; | ||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 4 | 1 | use Lemonldap::NG::Portal::Main::Constants qw( | |||||||||||||||||||||||||||||
| 5 | PE_SENDRESPONSE | ||||||||||||||||||||||||||||||
| 6 | PE_OK | ||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | ); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Mouse; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||
| 10 | 1 | extends 'Lemonldap::NG::Portal::Lib::OIDCPlugin'; | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||
| 12 | 1 | our $VERSION = '2.23.0'; | |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||
| 14 | # INTERFACE | ||||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use constant hook => { oidcGotTokenExchange => 'tokenExchange' }; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||
| 17 | # MAIN METHOD | ||||||||||||||||||||||||||||||
| 18 | # | ||||||||||||||||||||||||||||||
| 19 | # Important note: only PE_OK and PE_RESPONSE are used here because: | ||||||||||||||||||||||||||||||
| 20 | # - oidcGotTokenExchange only accept PE_SENDRESPONSE has positive response | ||||||||||||||||||||||||||||||
| 21 | # - PE_OK permits to continue to check other plugins | ||||||||||||||||||||||||||||||
| 22 | sub tokenExchange { | ||||||||||||||||||||||||||||||
| 23 | 2 | ▶ | my ( $self, $req, $rp ) = @_; | ||||||||||||||||||||||||||||
|
Subroutine
tokenExchange: called CC=18 SCAR=36.8
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||
| 25 | 2 | ▶ | unless ( $self->oidc ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 26 | 0 | $self->logger->error('Authentication is not OIDC, aborting'); | |||||||||||||||||||||||||||||
| 27 | 0 | return PE_OK; | |||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||
| 30 | 2 | $self->logger->debug("Matrix Refresh Token exchange for $rp"); | |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||
| 32 | # 1. Validate request | ||||||||||||||||||||||||||||||
| 33 | # | ||||||||||||||||||||||||||||||
| 34 | # Note that client_id and grant_type value are verified by | ||||||||||||||||||||||||||||||
| 35 | # ::/lib::OpenIDConnect | ||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||
| 37 | 2 | my $clientId = $req->param('client_id'); # already validated | |||||||||||||||||||||||||||||
| 38 | 2 | my $subjectToken = $req->param('subject_token'); | |||||||||||||||||||||||||||||
| 39 | 2 | ▶ | unless ($subjectToken) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 40 | 0 | $self->userLogger->error('Token exchange called without subject_token'); | |||||||||||||||||||||||||||||
| 41 | 0 | return PE_OK; | |||||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||
| 44 | # Even if these fields are required in Oauth2, it seems that it is not | ||||||||||||||||||||||||||||||
| 45 | # required by Keycloak.. | ||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||
| 47 | 2 | my @types; | |||||||||||||||||||||||||||||
| 48 | 2 | foreach my $name (qw(subject_token_type requested_token_type)) { | |||||||||||||||||||||||||||||
| 49 | 4 | my $val = $req->param($name); | |||||||||||||||||||||||||||||
| 50 | 4 | ▶ | if ($val) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 51 | 4 | ▶ | unless ($val =~ s/^urn:ietf:params:oauth:token-type:// | ||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$val =~ s/^urn:ietf:params:oauth:token-type:// and $val =~ /^(?:(?:refresh|access|id)_token|saml[12])$/
MC/DC0%0/2
$val =~ s/^urn:ietf:params:oauth:token-type:// and $val =~ /^(?:(?:refresh|access|id)_token|saml[12])$/
$val =~ s/^urn:ietf:params:oauth:token-type://
$val =~ /^(?:(?:refresh|access|id)_token|saml[12])$/
Truth table33%1/3
A and B
A= $val =~ s/^urn:ietf:params:oauth:token-type://B= $val =~ /^(?:(?:refresh|access|id)_token|saml[12])$/
| |||||||||||||||||||||||||||||||
| 52 | and $val =~ /^(?:(?:refresh|access|id)_token|saml[12])$/ ) | ||||||||||||||||||||||||||||||
| 53 | { | ||||||||||||||||||||||||||||||
| 54 | 0 | $self->logger->info( | |||||||||||||||||||||||||||||
| 55 | "Malformed $name: " . $req->param('subject_token_type') ); | ||||||||||||||||||||||||||||||
| 56 | 0 | return PE_OK; | |||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||
| 59 | 4 | push @types, $val; | |||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||
| 62 | # 2. Check for audience and authorization | ||||||||||||||||||||||||||||||
| 63 | 2 | my $targetClientId = $req->param('audience'); | |||||||||||||||||||||||||||||
| 64 | 2 | ▶ | my $target = { audience => $req->param('audience') // undef, }; | ||||||||||||||||||||||||||||
|
Condition50%1/2
$req->param("audience") // undef
MC/DC0%0/1
$req->param("audience") // undef
$req->param("audience")
Truth table50%1/2
A
A= $req->param("audience")
| |||||||||||||||||||||||||||||||
| 65 | 2 | ▶ | if ( $target->{audience} ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 66 | 2 | ▶ | if ( $target->{audience} eq $clientId ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 67 | 0 | $target->{rp} = $rp; | |||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||
| 69 | else { | ||||||||||||||||||||||||||||||
| 70 | my ($res) = grep { | ||||||||||||||||||||||||||||||
| 71 | $self->oidc->rpOptions->{$_}->{oidcRPMetaDataOptionsClientID} | ||||||||||||||||||||||||||||||
| 72 | 6 | eq $targetClientId | |||||||||||||||||||||||||||||
| 73 | 2 | } keys %{ $self->oidc->rpOptions }; | |||||||||||||||||||||||||||||
| 74 | 2 | $target->{rp} = $res; | |||||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||
| 77 | else { | ||||||||||||||||||||||||||||||
| 78 | 0 | $target->{rp} = $rp; | |||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||
| 81 | 2 | ▶ | unless ( $self->validateAudience( $req, $rp, $target, $types[1] ) ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 82 | 0 | $self->logger->debug( ref($self) . " refused to validate audience" ); | |||||||||||||||||||||||||||||
| 83 | 0 | return PE_OK; | |||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||
| 86 | # 3. Use subclass getUid() to get user ID | ||||||||||||||||||||||||||||||
| 87 | 2 | my $uid = $self->getUid( $req, $rp, $subjectToken, $types[0] ); | |||||||||||||||||||||||||||||
| 88 | 2 | ▶ | return PE_OK unless $uid; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||
| 90 | # 4. Create refresh_token | ||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||
| 92 | 2 | my $opts = { $self->oidc->_storeOpts() }; | |||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||
| 94 | # 3.1. Create a new refresh_token if missing | ||||||||||||||||||||||||||||||
| 95 | 2 | $req->user($uid); | |||||||||||||||||||||||||||||
| 96 | 2 | $req->steps( [ | |||||||||||||||||||||||||||||
| 97 | 'getUser', 'setAuthSessionInfo', | ||||||||||||||||||||||||||||||
| 98 | 'setSessionInfo', $self->p->groupsAndMacros, | ||||||||||||||||||||||||||||||
| 99 | 'setLocalGroups' | ||||||||||||||||||||||||||||||
| 100 | ] | ||||||||||||||||||||||||||||||
| 101 | ); | ||||||||||||||||||||||||||||||
| 102 | 2 | ▶ | if ( my $error = $self->p->process($req) ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 103 | 0 | ▶ | if ( $error == PE_OK ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 104 | $self->userLogger->warn( | ||||||||||||||||||||||||||||||
| 105 | 'Token exchange requested for an invalid user (' | ||||||||||||||||||||||||||||||
| 106 | . $req->{user} | ||||||||||||||||||||||||||||||
| 107 | 0 | . ")" ); | |||||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||||
| 109 | 0 | $self->logger->error("Unable to find user $uid"); | |||||||||||||||||||||||||||||
| 110 | 0 | return PE_OK; | |||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||
| 113 | my $refreshToken = $self->oidc->newRefreshToken( | ||||||||||||||||||||||||||||||
| 114 | $rp, | ||||||||||||||||||||||||||||||
| 115 | { | ||||||||||||||||||||||||||||||
| 116 | 2 | ▶ | %{ $req->sessionInfo }, | ||||||||||||||||||||||||||||
|
Condition40%2/5
$req->param('scope') || 'openid'
$target->{'audience'} || $self->oidc->rpOptions->{$rp}{'oidcRPMetaDataOptionsClientID'}
MC/DC0%0/1
$req->param('scope') || 'openid'
$req->param('scope')
MC/DC0%0/2
$target->{'audience'} || $self->oidc->rpOptions->{$rp}{'oidcRPMetaDataOptionsClientID'}
$target->{'audience'}
$self->oidc->rpOptions->{$rp}{'oidcRPMetaDataOptionsClientID'}
Truth table50%1/2
A
A= $req->param('scope')
Truth table33%1/3
A || B
A= $target->{'audience'}B= $self->oidc->rpOptions->{$rp}{'oidcRPMetaDataOptionsClientID'}
| |||||||||||||||||||||||||||||||
| 117 | scope => $req->param('scope') || 'openid', | ||||||||||||||||||||||||||||||
| 118 | client_id => $target->{audience} | ||||||||||||||||||||||||||||||
| 119 | || $self->oidc->rpOptions->{$rp}->{oidcRPMetaDataOptionsClientID}, | ||||||||||||||||||||||||||||||
| 120 | 2 | _session_uid => $uid, | |||||||||||||||||||||||||||||
| 121 | grant_type => $req->param('grant_type'), | ||||||||||||||||||||||||||||||
| 122 | }, | ||||||||||||||||||||||||||||||
| 123 | ); | ||||||||||||||||||||||||||||||
| 124 | 2 | ▶ | unless ($refreshToken) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 125 | 0 | return PE_OK; | |||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||
| 128 | # 5. Use normal method to create new access_token from refresh_token | ||||||||||||||||||||||||||||||
| 129 | # | ||||||||||||||||||||||||||||||
| 130 | # TODO: remote may want a refresh_token | ||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||
| 132 | 2 | ▶ | my $res = $self->oidc->_handleRefreshTokenGrant( $req, $target->{rp} || $rp, | ||||||||||||||||||||||||||||
|
Condition33%1/3
$target->{'rp'} || $rp
MC/DC0%0/2
$target->{'rp'} || $rp
$target->{'rp'}
$rp
Truth table33%1/3
A || B
A= $target->{'rp'}B= $rp
| |||||||||||||||||||||||||||||||
| 133 | $refreshToken->id, $targetClientId ); | ||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||
| 135 | # Insert refresh_token in response | ||||||||||||||||||||||||||||||
| 136 | 2 | my $tmp = JSON::from_json( $res->[2]->[0] ); | |||||||||||||||||||||||||||||
| 137 | 2 | $tmp->{refresh_token} = $refreshToken->id; | |||||||||||||||||||||||||||||
| 138 | 2 | $res->[2]->[0] = JSON::to_json($tmp); | |||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||
| 140 | 2 | $req->response($res); | |||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||
| 142 | 2 | return PE_SENDRESPONSE; | |||||||||||||||||||||||||||||
| 143 | } | ||||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||||
| 145 | 1 | 1; | |||||||||||||||||||||||||||||
| 146 | __END__ | ||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||
| 148 | =pod | ||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||
| 150 | =encoding utf8 | ||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||
| 152 | =head1 NAME | ||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||
| 154 | Lemonldap::NG::Portal::Lib::OIDCTokenExchange - Base class for building OpenID | ||||||||||||||||||||||||||||||
| 155 | Connect token exchange systems. | ||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||
| 157 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||
| 159 | use Mouse | ||||||||||||||||||||||||||||||
| 160 | extends 'Lemonldap::NG::Portal::Lib::OIDCTokenExchange'; | ||||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||||
| 162 | sub validateAudience { | ||||||||||||||||||||||||||||||
| 163 | my ( $self, $req, $rp, $target, $requestedTokenType ) = @_; | ||||||||||||||||||||||||||||||
| 164 | # | ||||||||||||||||||||||||||||||
| 165 | # verify and update if needed: | ||||||||||||||||||||||||||||||
| 166 | # * $target->{audience} | ||||||||||||||||||||||||||||||
| 167 | # * $target->{rp} | ||||||||||||||||||||||||||||||
| 168 | # | ||||||||||||||||||||||||||||||
| 169 | return 1; | ||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||
| 172 | sub getUid { | ||||||||||||||||||||||||||||||
| 173 | my ( $self, $req, $rp, $subjectToken, $subjectTokenType ) = @_; | ||||||||||||||||||||||||||||||
| 174 | # | ||||||||||||||||||||||||||||||
| 175 | # verify subjectToken | ||||||||||||||||||||||||||||||
| 176 | # | ||||||||||||||||||||||||||||||
| 177 | return 1; | ||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||
| 180 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||
| 182 | When L<Lemonldap::NG|https://lemonldap-ng.org> detects a | ||||||||||||||||||||||||||||||
| 183 | L<Oauth2 token exchange|https://datatracker.ietf.org/doc/html/rfc8693> request, | ||||||||||||||||||||||||||||||
| 184 | it searches for a plugin able to respond. If no one returns a valid response, | ||||||||||||||||||||||||||||||
| 185 | it rejects the requests. | ||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||
| 187 | B<Lemonldap::NG::Portal::Lib::OIDCTokenExchange> permits one to build such | ||||||||||||||||||||||||||||||
| 188 | plugin by just writing two methods. Of course you need then to load the module | ||||||||||||||||||||||||||||||
| 189 | for example using L<Enabling custom plugin|https://lemonldap-ng.org/documentation/latest/plugincustom.html#enabling-your-plugin>. | ||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||
| 191 | =head2 Methods to write | ||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||
| 193 | =head3 validateAudience | ||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||
| 195 | The goal of C<validateAudience()> is to validate the requested B<audience>. | ||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||
| 197 | If a non-null value is returned, then the request is accepted and Lemonldap::NG | ||||||||||||||||||||||||||||||
| 198 | will build new C<access_token>, C<id_token> and C<refresh_token> using the | ||||||||||||||||||||||||||||||
| 199 | values included into C<$target> hash. | ||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||
| 201 | If a null value is returned, Lemonldap::NG will try the next plugin. | ||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||
| 203 | Parameters: | ||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||
| 205 | =over | ||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||
| 207 | =item * B<$req>, the L<Lemonldap::NG::Portal::Main::Request> object | ||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||
| 209 | =item * B<$rp>, the internal LLNG name of the Relying Party which pushed the request | ||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||
| 211 | =item * B<$target>, a hash value with 2 keys: | ||||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||||
| 213 | =over | ||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||
| 215 | =item * B<audience>, the requested audience | ||||||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||||||
| 217 | =item * B<rp>: if B<Lemonldap::NG> found a known Relying Party which Client-ID | ||||||||||||||||||||||||||||||
| 218 | matches with requested audience, its name is put here, else this value is | ||||||||||||||||||||||||||||||
| 219 | undefined. | ||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||
| 221 | =back | ||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||
| 223 | This value can be modified inside C<validateAudience> and will be used to generate | ||||||||||||||||||||||||||||||
| 224 | the new C<access_token>. | ||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||
| 226 | =item * B<$requestedTokenType>, the type of the requested token. This value is always | ||||||||||||||||||||||||||||||
| 227 | one of: | ||||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||||
| 229 | =over | ||||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||||
| 231 | =item * B<access_token> | ||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||
| 233 | =item * B<refresh_token> | ||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||
| 235 | =item * B<id_token> | ||||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||||
| 237 | =item * B<saml1> | ||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||
| 239 | =item * B<saml2> | ||||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||||
| 241 | =item * I<undef> | ||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||
| 243 | =back | ||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||
| 245 | =back | ||||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||||
| 247 | =head3 getUid | ||||||||||||||||||||||||||||||
| 248 | |||||||||||||||||||||||||||||||
| 249 | C<getUid()> is a boolean method to validate the token given in the request. | ||||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||||
| 251 | If a non-null value is returned, then the request is accepted. Else Lemonldap::NG | ||||||||||||||||||||||||||||||
| 252 | will try the next plugin. | ||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||
| 254 | Parameters: | ||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||
| 256 | =over | ||||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||||
| 258 | =item * B<$req>, the L<Lemonldap::NG::Portal::Main::Request> object | ||||||||||||||||||||||||||||||
| 259 | |||||||||||||||||||||||||||||||
| 260 | =item * B<$rp>, the internal LLNG name of the Relying Party which pushed the request | ||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||
| 262 | =item * B<$subjectToken>, the token given in the request | ||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||
| 264 | =item * B<$subjectTokenType>, the type of the given token. This value is always | ||||||||||||||||||||||||||||||
| 265 | one of: | ||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||
| 267 | =over | ||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||
| 269 | =item * B<access_token> | ||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||
| 271 | =item * B<refresh_token> | ||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||
| 273 | =item * B<id_token> | ||||||||||||||||||||||||||||||
| 274 | |||||||||||||||||||||||||||||||
| 275 | =item * B<saml1> | ||||||||||||||||||||||||||||||
| 276 | |||||||||||||||||||||||||||||||
| 277 | =item * B<saml2> | ||||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||||
| 279 | =item * I<undef> | ||||||||||||||||||||||||||||||
| 280 | |||||||||||||||||||||||||||||||
| 281 | =back | ||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||
| 283 | =back | ||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||
| 285 | =head1 AUTHORS | ||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||
| 287 | =over | ||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||
| 289 | =item * LemonLDAP::NG team L<http://lemonldap-ng.org/team> | ||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||
| 291 | =back | ||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||
| 293 | =head1 BUG REPORT | ||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||
| 295 | Use OW2 system to report bug or ask for features: | ||||||||||||||||||||||||||||||
| 296 | L<https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues> | ||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||
| 298 | =head1 DOWNLOAD | ||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||
| 300 | Lemonldap::NG is available at | ||||||||||||||||||||||||||||||
| 301 | L<https://lemonldap-ng.org/download> | ||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||
| 303 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||
| 305 | See COPYING file for details. | ||||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||||
| 307 | This library is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||
| 308 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||
| 309 | the Free Software Foundation; either version 2, or (at your option) | ||||||||||||||||||||||||||||||
| 310 | any later version. | ||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||
| 312 | This program is distributed in the hope that it will be useful, | ||||||||||||||||||||||||||||||
| 313 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||||||||||||||||||||
| 314 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||||||||||||||||||||||||||
| 315 | GNU General Public License for more details. | ||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||
| 317 | You should have received a copy of the GNU General Public License | ||||||||||||||||||||||||||||||
| 318 | along with this program. If not, see L<http://www.gnu.org/licenses/>. | ||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||
| 320 | =cut | ||||||||||||||||||||||||||||||