Commit 01aec284 authored by Clément OUDOT's avatar Clément OUDOT

Use prompt (#183)

parent 86555198
......@@ -93,6 +93,13 @@ has 'oidcOPMetaDataOptionsJWKSTimeout' => (
documentation => "OIDC OP JWKS data refresh interval",
);
has 'oidcOPMetaDataOptionsPrompt' => (
is => 'rw',
isa => 'Str|Undef',
default => undef,
documentation => "OIDC OP prompt",
);
has 'oidcOPMetaDataOptionsScope' => (
is => 'rw',
isa => 'Str',
......
......@@ -287,12 +287,14 @@ sub cstruct {
},
oidcOPMetaDataOptionsProtocol => {
_nodes => [
qw(oidcOPMetaDataOptionsScope oidcOPMetaDataOptionsDisplay oidcOPMetaDataOptionsTokenEndpointAuthMethod oidcOPMetaDataOptionsCheckJWTSignature)
qw(oidcOPMetaDataOptionsScope oidcOPMetaDataOptionsDisplay oidcOPMetaDataOptionsPrompt oidcOPMetaDataOptionsTokenEndpointAuthMethod oidcOPMetaDataOptionsCheckJWTSignature)
],
oidcOPMetaDataOptionsScope =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsScope",
oidcOPMetaDataOptionsDisplay =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsDisplay",
oidcOPMetaDataOptionsPrompt =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsPrompt",
oidcOPMetaDataOptionsTokenEndpointAuthMethod =>
"text:/oidcOPMetaDataOptions/$k2/oidcOPMetaDataOptionsTokenEndpointAuthMethod",
oidcOPMetaDataOptionsCheckJWTSignature =>
......
......@@ -280,6 +280,7 @@ sub en {
oidcOPMetaDataOptionsDisplayName => 'Display name',
oidcOPMetaDataOptionsIcon => 'Logo',
oidcOPMetaDataOptionsJWKSTimeout => 'JWKS data timeout',
oidcOPMetaDataOptionsPrompt => 'Prompt',
oidcOPMetaDataOptionsProtocol => 'Protocol',
oidcOPMetaDataOptionsScope => 'Scope',
oidcOPMetaDataOptionsTokenEndpointAuthMethod =>
......@@ -844,6 +845,7 @@ sub fr {
oidcOPMetaDataOptionsDisplayName => 'Nom d\'affichage',
oidcOPMetaDataOptionsIcon => 'Logo',
oidcOPMetaDataOptionsJWKSTimeout => 'Durée de vie des données JWKS',
oidcOPMetaDataOptionsPrompt => 'Interaction',
oidcOPMetaDataOptionsProtocol => 'Protocole',
oidcOPMetaDataOptionsScope => 'Étendue',
oidcOPMetaDataOptionsTokenEndpointAuthMethod =>
......
......@@ -235,6 +235,8 @@ sub buildAuthorizationCodeAuthnRequest {
my $nonce = $nonceSession->id;
my $display =
$self->{oidcOPMetaDataOptions}->{$op}->{oidcOPMetaDataOptionsDisplay};
my $prompt =
$self->{oidcOPMetaDataOptions}->{$op}->{oidcOPMetaDataOptionsPrompt};
$client_id = uri_escape($client_id);
$scope = uri_escape($scope);
......@@ -243,6 +245,7 @@ sub buildAuthorizationCodeAuthnRequest {
$state = uri_escape($state) if defined $state;
$nonce = uri_escape($nonce);
$display = uri_escape($display) if defined $display;
$prompt = uri_escape($prompt) if defined $prompt;
my $authn_uri = $authorize_uri;
$authn_uri .= ( $authorize_uri =~ /\?/ ? '&' : '?' );
......@@ -253,6 +256,7 @@ sub buildAuthorizationCodeAuthnRequest {
$authn_uri .= "&state=$state" if defined $state;
$authn_uri .= "&nonce=$nonce" if defined $nonce;
$authn_uri .= "&display=$display" if defined $display;
$authn_uri .= "&prompt=$prompt" if defined $prompt;
$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