File tree Expand file tree Collapse file tree
modules/go5auth/lib/Auth/Source Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ public function authenticate(&$state)
3535 $ userInfo = $ this ->getUserInfo ($ accessToken );
3636
3737 if ($ userInfo ->data ->attributes ->status != 'active ' ) {
38- throw new SimpleSAML_Error_Exception ('go5auth | error: inactive user ' . $ userInfo ->data ->id );
38+ header ('HTTP/1.1 403 Forbidden ' );
39+ echo 'go5auth | error: inactive user ' ;
40+ exit ;
3941 }
4042
4143 $ userAttributes = [
@@ -66,7 +68,9 @@ private function getUserInfo($token)
6668 return json_decode ($ userResponse ->getBody ()->getContents ());
6769
6870 } catch (HttpClientException $ e ) {
69- throw new SimpleSAML_Error_Exception ('go5auth | error: ' . $ e ->getMessage ());
71+ header ('HTTP/1.1 401 Unauthorized ' );
72+ echo 'go5auth | error: invalid access_token ' ;
73+ exit ;
7074 }
7175 }
7276}
You can’t perform that action at this time.
0 commit comments