Commit 86555198 authored by Clément OUDOT's avatar Clément OUDOT

Use display (#183)

parent 9936ade2
......@@ -65,6 +65,13 @@ has 'oidcOPMetaDataOptionsConfigurationURI' => (
documentation => "OIDC OP configuration endpoint",
);
has 'oidcOPMetaDataOptionsDisplay' => (
is => 'rw',
isa => 'Str|Undef',
default => undef,
documentation => "OIDC OP display",
);
has 'oidcOPMetaDataOptionsDisplayName' => (
is => 'rw',
isa => 'Str',
......
......@@ -287,10 +287,12 @@ sub cstruct {
},
oidcOPMetaDataOptionsProtocol => {
_nodes => [
qw(oidcOPMetaDataOptionsScope oidcOPMetaDataOptionsTokenEndpointAuthMethod oidcOPMetaDataOptionsCheckJWTSignature)
qw(oidcOPMetaDataOptionsScope oidcOPMetaDataOptionsDisplay oidcOPMetaDataOptionsTokenEndpointAuthMethod oidcOPMetaDataOptionsCheckJWTSignature)
],
oidcOPMetaDataOptionsScope =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsScope",
oidcOPMetaDataOptionsDisplay =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsDisplay",
oidcOPMetaDataOptionsTokenEndpointAuthMethod =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsTokenEndpointAuthMethod",
oidcOPMetaDataOptionsCheckJWTSignature =>
......@@ -317,7 +319,7 @@ sub cstruct {
oidcRPMetaDataNode => {
$k2 => {
_nodes =>
[ qw(oidcRPMetaDataExportedVars oidcRPMetaDataOptions) ],
[qw(oidcRPMetaDataExportedVars oidcRPMetaDataOptions)],
oidcRPMetaDataExportedVars => {
_nodes =>
["hash:/oidcRPMetaDataExportedVars/$k2:vars:btext"],
......
......@@ -233,6 +233,8 @@ sub buildAuthorizationCodeAuthnRequest {
my $nonceSession = $self->getOpenIDConnectSession();
$nonceSession->update( { '_utime' => time } );
my $nonce = $nonceSession->id;
my $display =
$self->{oidcOPMetaDataOptions}->{$op}->{oidcOPMetaDataOptionsDisplay};
$client_id = uri_escape($client_id);
$scope = uri_escape($scope);
......@@ -240,6 +242,7 @@ sub buildAuthorizationCodeAuthnRequest {
$redirect_uri = uri_escape($redirect_uri);
$state = uri_escape($state) if defined $state;
$nonce = uri_escape($nonce);
$display = uri_escape($display) if defined $display;
my $authn_uri = $authorize_uri;
$authn_uri .= ( $authorize_uri =~ /\?/ ? '&' : '?' );
......@@ -247,8 +250,9 @@ sub buildAuthorizationCodeAuthnRequest {
$authn_uri .= "&client_id=$client_id";
$authn_uri .= "&scope=$scope";
$authn_uri .= "&redirect_uri=$redirect_uri";
$authn_uri .= "&state=$state" if defined $state;
$authn_uri .= "&nonce=$nonce" if defined $nonce;
$authn_uri .= "&state=$state" if defined $state;
$authn_uri .= "&nonce=$nonce" if defined $nonce;
$authn_uri .= "&display=$display" if defined $display;
$self->lmLog(
"OpenIDConnect Authorization Code Flow Authn Request: $authn_uri",
......
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