Skip to content

Instantly share code, notes, and snippets.

@maligree
Last active December 12, 2015 07:39
Show Gist options
  • Select an option

  • Save maligree/4738189 to your computer and use it in GitHub Desktop.

Select an option

Save maligree/4738189 to your computer and use it in GitHub Desktop.
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Received SAML2 Response from 'http://idp-linex.jelastic.planeetta.net:80/openam'.
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] No certificate in message when validating against fingerprint.
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Found 1 certificates in SAML2_Assertion
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Has 1 candidate keys for validation.
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Validation with key #0 succeeded.
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Filter config for http://idp-linex.jelastic.planeetta.net:80/openam->http://saml-cake.aws.af.cm/simplesaml/module.php/saml/sp/metadata.php/default-sp: array ( 0 => sspmod_core_Auth_Process_GenerateGroups::__set_state(array( 'generateGroupsFrom' => array ( 0 => 'eduPersonAffiliation', ), 'priority' => 60, )), 1 => sspmod_core_Auth_Process_AttributeAdd::__set_state(array( 'replace' => false, 'attributes' => array ( 'groups' => array ( 0 => 'users', 1 => 'members', ), ), 'priority' => 61, )), 2 => sspmod_core_Auth_Process_LanguageAdaptor::__set_state(array( 'langattr' => 'preferredLanguage', 'priority' => 90, )),)
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] GenerateGroups - attribute 'eduPersonAffiliation' not found.
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Deleting state: '_4c5af2f5e845e20983ab2c97143cf1bd6b0c669279'
Feb 07 18:01:31 simplesamlphp DEBUG [1bff827598] Session: doLogin("default-sp")
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Session: 'default-sp' not valid because we are not authenticated.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Saved state: '_5fe9ccf9f1e8d48e7ad4772fda9016aba5a0e5759f'
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Sending SAML 2 AuthnRequest to 'http://idp-linex.jelastic.planeetta.net:80/openam'
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Sending message:
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
[snip]
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Received SAML2 Response from 'http://idp-linex.jelastic.planeetta.net:80/openam'.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] No certificate in message when validating against fingerprint.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Found 1 certificates in SAML2_Assertion
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Has 1 candidate keys for validation.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Validation with key #0 succeeded.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Filter config for http://idp-linex.jelastic.planeetta.net:80/openam->http://saml-cake.aws.af.cm/simplesaml/module.php/saml/sp/metadata.php/default-sp: array ( 0 => sspmod_core_Auth_Process_GenerateGroups::__set_state(array( 'generateGroupsFrom' => array ( 0 => 'eduPersonAffiliation', ), 'priority' => 60, )), 1 => sspmod_core_Auth_Process_AttributeAdd::__set_state(array( 'replace' => false, 'attributes' => array ( 'groups' => array ( 0 => 'users', 1 => 'members', ), ), 'priority' => 61, )), 2 => sspmod_core_Auth_Process_LanguageAdaptor::__set_state(array( 'langattr' => 'preferredLanguage', 'priority' => 90, )),)
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] GenerateGroups - attribute 'eduPersonAffiliation' not found.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Deleting state: '_5fe9ccf9f1e8d48e7ad4772fda9016aba5a0e5759f'
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Session: doLogin("default-sp")
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Session: Valid session found with 'default-sp'.
Feb 07 18:01:31 simplesamlphp DEBUG [50f7321c5c] Session: Valid session found with 'default-sp'.
Feb 07 18:01:34 simplesamlphp DEBUG [50f7321c5c] Session: Valid session found with 'default-sp'.
Feb 07 18:01:34 simplesamlphp DEBUG [50f7321c5c] Session: Valid session found with 'default-sp'.
Feb 07 18:01:40 simplesamlphp DEBUG [50f7321c5c] Session: Valid session found with 'default-sp'.
[lib code]
/**
* Is the session representing an authenticated user, and is the session still alive.
* This function will return false after the user has timed out.
*
* @param string $authority The authentication source that the user should be authenticated with.
* @return TRUE if the user has a valid session, FALSE if not.
*/
public function isValid($authority) {
assert('is_string($authority)');
if (!isset($this->authData[$authority])) {
SimpleSAML_Logger::debug('Session: '. var_export($authority, TRUE) .' not valid because we are not authenticated.');
return FALSE;
}
if ($this->authData[$authority]['Expire'] <= time()) {
SimpleSAML_Logger::debug('Session: ' . var_export($authority, TRUE) .' not valid because it is expired.');
return FALSE;
}
SimpleSAML_Logger::debug('Session: Valid session found with ' . var_export($authority, TRUE) . '.');
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment