Skip to content
Snippets Groups Projects
Commit 7745a955 authored by Olav Morken's avatar Olav Morken
Browse files

Error_UserAborted: Subclass Error_Error instead.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2738 44740490-163a-0410-bde0-09ae8108e29a
parent 222075e3
No related branches found
No related tags found
No related merge requests found
...@@ -193,5 +193,11 @@ ...@@ -193,5 +193,11 @@
}, },
"descr_UNKNOWNCERT": { "descr_UNKNOWNCERT": {
"en": "Authentication failed: the certificate your browser sent is unknown" "en": "Authentication failed: the certificate your browser sent is unknown"
},
"title_USERABORTED": {
"en": "Authentication aborted"
},
"descr_USERABORTED": {
"en": "The authentication was aborted by the user"
} }
} }
<?php <?php
/** /**
* Exception indicating user aborting the authentication proces. * Exception indicating user aborting the authentication process.
* *
* @package simpleSAMLphp_base * @package simpleSAMLphp
* @version $Id$ * @version $Id$
*
*/ */
class SimpleSAML_Error_UserAborted extends SimpleSAML_Error_User{ class SimpleSAML_Error_UserAborted extends SimpleSAML_Error_Error {
}
?> /**
* Create the error
*
* @param Exception|NULL $cause The exception that caused this error.
*/
public function __construct(Exception $cause = NULL) {
parent::__construct('USERABORTED', $cause);
}
}
...@@ -15,7 +15,7 @@ $state = SimpleSAML_Auth_State::loadState($stateId, sspmod_authmyspace_Auth_Sour ...@@ -15,7 +15,7 @@ $state = SimpleSAML_Auth_State::loadState($stateId, sspmod_authmyspace_Auth_Sour
if (array_key_exists('oauth_problem', $_REQUEST)) { if (array_key_exists('oauth_problem', $_REQUEST)) {
// oauth_problem of 'user_refused' means user chose not to login with MySpace // oauth_problem of 'user_refused' means user chose not to login with MySpace
if (strcmp($_REQUEST['oauth_problem'],'user_refused') == 0) { if (strcmp($_REQUEST['oauth_problem'],'user_refused') == 0) {
$e = new SimpleSAML_Error_UserAborted('User aborted authentication.'); $e = new SimpleSAML_Error_UserAborted();
SimpleSAML_Auth_State::throwException($state, $e); SimpleSAML_Auth_State::throwException($state, $e);
} }
......
...@@ -24,7 +24,7 @@ if (array_key_exists('wrap_verification_code', $_REQUEST)) { ...@@ -24,7 +24,7 @@ if (array_key_exists('wrap_verification_code', $_REQUEST)) {
// wrap_error_reason = 'user_denied' means user chose not to login with LiveID // wrap_error_reason = 'user_denied' means user chose not to login with LiveID
// redirect them to their original page so they can choose another auth mechanism // redirect them to their original page so they can choose another auth mechanism
if ($_REQUEST['wrap_error_reason'] === 'user_denied') { if ($_REQUEST['wrap_error_reason'] === 'user_denied') {
$e = new SimpleSAML_Error_UserAborted('User aborted authentication.'); $e = new SimpleSAML_Error_UserAborted();
SimpleSAML_Auth_State::throwException($state, $e); SimpleSAML_Auth_State::throwException($state, $e);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment