Set basic conditions in SAML response (#324)
This commit is contained in:
parent
42fae3db68
commit
d0398f249b
@ -11,7 +11,7 @@ use Lemonldap::NG::Portal::Simple;
|
|||||||
use Lemonldap::NG::Portal::_SAML;
|
use Lemonldap::NG::Portal::_SAML;
|
||||||
our @ISA = qw(Lemonldap::NG::Portal::_SAML);
|
our @ISA = qw(Lemonldap::NG::Portal::_SAML);
|
||||||
|
|
||||||
our $VERSION = '1.0.0';
|
our $VERSION = '1.1.0';
|
||||||
|
|
||||||
## @method void issuerDBInit()
|
## @method void issuerDBInit()
|
||||||
# Load and check SAML configuration
|
# Load and check SAML configuration
|
||||||
@ -1512,6 +1512,19 @@ sub issuerForAuthUser {
|
|||||||
$response_assertions[0]
|
$response_assertions[0]
|
||||||
->set_subject_name_id( $login->nameIdentifier );
|
->set_subject_name_id( $login->nameIdentifier );
|
||||||
|
|
||||||
|
# Set basic conditions
|
||||||
|
my $oneTimeUse =
|
||||||
|
$self->{samlSPMetaDataOptions}->{$spConfKey}
|
||||||
|
->{samlSPMetaDataOptionsOneTimeUse};
|
||||||
|
|
||||||
|
eval {
|
||||||
|
$response_assertions[0]
|
||||||
|
->set_basic_conditions( 60, 86400, $oneTimeUse );
|
||||||
|
};
|
||||||
|
if ($@) {
|
||||||
|
$self->lmLog( "Basic conditions not set: $@", 'debug' );
|
||||||
|
}
|
||||||
|
|
||||||
# Create attribute statement
|
# Create attribute statement
|
||||||
if ( scalar @attributes ) {
|
if ( scalar @attributes ) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user