Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
9dd777a0
Commit
9dd777a0
authored
May 31, 2007
by
Donal McMullan
Browse files
Arrival point for incoming sso users
parent
c970017a
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/xmlrpc/land.php
0 → 100644
View file @
9dd777a0
<?php
/**
* @author Martin Dougiamas
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package moodle multiauth
*
* Authentication Plugin: Moodle Network Authentication
*
* Multiple host authentication support for Moodle Network.
*
* 2006-11-01 File created.
*/
define
(
'INTERNAL'
,
1
);
define
(
'PUBLIC'
,
1
);
define
(
'XMLRPC'
,
1
);
require
(
dirname
(
dirname
(
dirname
(
__FILE__
)))
.
'/init.php'
);
require_once
(
$CFG
->
docroot
.
'/api/xmlrpc/client.php'
);
require_once
(
$CFG
->
docroot
.
'/auth/xmlrpc/lib.php'
);
require_once
(
$CFG
->
docroot
.
'/include/eLearning/institution.php'
);
$token
=
param_variable
(
'token'
);
$remotewwwroot
=
param_variable
(
'idp'
);
$wantsurl
=
param_variable
(
'wantsurl'
,
'/'
);
$institution
=
new
Institution
();
$institution
->
findByWwwroot
(
$remotewwwroot
);
$instances
=
auth_get_auth_instances_for_wwwroot
(
$remotewwwroot
);
foreach
(
$instances
as
$instance
)
{
if
(
$instance
->
authname
==
'xmlrpc'
)
{
try
{
$auth
=
new
AuthXmlrpc
(
$instance
->
id
);
$res
=
$auth
->
request_user_authorise
(
$token
,
$remotewwwroot
);
}
catch
(
Exception
$e
)
{
// we don't care
}
if
(
$res
instanceof
User
)
{
break
;
}
}
}
// confirm the MNET session
// redirect
redirect
(
$CFG
->
wwwroot
.
$wantsurl
);
?>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment