diff --git a/auth/shibboleth/README.txt b/auth/shibboleth/README.txt
new file mode 100644
index 00000000000..91d2ed7ca6b
--- /dev/null
+++ b/auth/shibboleth/README.txt
@@ -0,0 +1 @@
+Under development
diff --git a/auth/shibboleth/config.html b/auth/shibboleth/config.html
new file mode 100755
index 00000000000..7292a57e09d
--- /dev/null
+++ b/auth/shibboleth/config.html
@@ -0,0 +1,134 @@
+
+
+ Shibboleth WAYF url: |
+
+
+
+ |
+
+ |
+
+
+ Shibboleth logout url: |
+
+
+ |
+ |
+
+
+ : |
+
+
+ |
+
+ |
+
+
+
+ : |
+
+
+ |
+
+ |
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ 1: |
+
+
+ |
+
+
+
+ 2: |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+ : |
+
+
+ |
+
+
+
+
+ : |
+
+
+ |
+
+
+
+ |
+
+
+
+
+
diff --git a/auth/shibboleth/lib.php b/auth/shibboleth/lib.php
new file mode 100755
index 00000000000..4024a0d59fe
--- /dev/null
+++ b/auth/shibboleth/lib.php
@@ -0,0 +1,60 @@
+shib_user_attribute] == $username) {
+ return true;
+ }
+ // Returns false if the username doesn't exist yet
+ // Returns true if the username and password work
+ if ($user = get_user_info_from_db("username", $username)) {
+ if($user->auth == "shibboleth") {
+ return false;
+ exit;
+ } else {
+ return ($user->password == md5($password));
+ exit;
+ }
+ }
+
+ return false;
+}
+
+function auth_get_userinfo($username) {
+// reads user information from shibboleth attributes and return it in array()
+ global $CFG;
+
+ $config = (array)$CFG;
+ $attrmap = auth_shib_attributes();
+
+ $result = array();
+ $search_attribs = array();
+
+ foreach ($attrmap as $key=>$value) {
+ $result[$key]=$_SERVER[$value];
+ }
+ return $result;
+}
+
+function auth_shib_attributes (){
+//returns array containg attribute mappings between Moodle and shibboleth
+ global $CFG;
+
+ $config = (array)$CFG;
+ $fields = array("firstname", "lastname", "email", "phone1", "phone2",
+ "department", "address", "city", "country", "description",
+ "idnumber", "lang", "guid");
+
+ $moodleattributes = array();
+ foreach ($fields as $field) {
+ if ($config["auth_user_$field"]) {
+ $moodleattributes[$field] = $config["auth_user_$field"];
+ }
+ }
+ $moodleattributes['username']=$config["shib_user_attribute"];
+ return $moodleattributes;
+}
+?>