ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSOAPAuth Class Reference

Class SOAPAuth. More...

+ Inheritance diagram for ilSOAPAuth:
+ Collaboration diagram for ilSOAPAuth:

Static Public Member Functions

static testConnection ($a_ext_uid, $a_soap_pw, $a_new_user)
 Constructor public. More...
 
- Static Public Member Functions inherited from Auth
_factory ($driver, $options='')
 Return a storage driver based on $driver and $options. More...
 
 staticCheckAuth ($options=null)
 Statically checks if there is a session with valid auth information. More...
 

Data Fields

 $valid = array()
 
- Data Fields inherited from Auth
 $expire = 0
 
 $expired = false
 
 $idle = 0
 
 $idled = false
 
 $storage = ''
 
 $loginFunction = ''
 
 $showLogin = true
 
 $allowLogin = true
 
 $status = ''
 
 $username = ''
 
 $password = ''
 
 $checkAuthCallback = ''
 
 $loginCallback = ''
 
 $loginFailedCallback = ''
 
 $logoutCallback = ''
 
 $_sessionName = '_authsession'
 
 $version = "@version@"
 
 $advancedsecurity = false
 
 $_postUsername = 'username'
 
 $_postPassword = 'password'
 
 $session
 
 $server
 
 $post
 
 $cookie
 
 $authdata
 
 $authChecks = 0
 
 $logger = null
 
 $enableLogging = false
 
 $regenerateSessionId = false
 

Additional Inherited Members

- Public Member Functions inherited from Auth
 Auth ($storageDriver, $options='', $loginFunction='', $showLogin=true)
 Constructor. More...
 
applyAuthOptions (&$options)
 Set the Auth options. More...
 
 _loadStorage ()
 Load Storage Driver if not already loaded. More...
 
 assignData ()
 Assign data from login form to internal values. More...
 
 start ()
 Start new auth session. More...
 
 login ()
 Login function. More...
 
 setExpire ($time, $add=false)
 Set the maximum expire time. More...
 
 setIdle ($time, $add=false)
 Set the maximum idle time. More...
 
 setSessionName ($name='session')
 Set name of the session to a customized value. More...
 
 setShowLogin ($showLogin=true)
 Should the login form be displayed if neccessary? More...
 
 setAllowLogin ($allowLogin=true)
 Should the login form be displayed if neccessary? More...
 
 setCheckAuthCallback ($checkAuthCallback)
 Register a callback function to be called whenever the validity of the login is checked The function will receive two parameters, the username and a reference to the auth object. More...
 
 setLoginCallback ($loginCallback)
 Register a callback function to be called on user login. More...
 
 setFailedLoginCallback ($loginFailedCallback)
 Register a callback function to be called on failed user login. More...
 
 setLogoutCallback ($logoutCallback)
 Register a callback function to be called on user logout. More...
 
 setAuthData ($name, $value, $overwrite=true)
 Register additional information that is to be stored in the session. More...
 
 getAuthData ($name=null)
 Get additional information that is stored in the session. More...
 
 setAuth ($username)
 Register variable in a session telling that the user has logged in successfully. More...
 
 setAdvancedSecurity ($flag=true)
 Enables advanced security checks. More...
 
 checkAuth ()
 Checks if there is a session with valid auth information. More...
 
 getAuth ()
 Has the user been authenticated? More...
 
 logout ()
 Logout function. More...
 
 updateIdle ()
 Update the idletime. More...
 
 getUsername ()
 Get the username. More...
 
 getStatus ()
 Get the current status. More...
 
 getPostUsernameField ()
 Gets the post varible used for the username. More...
 
 getPostPasswordField ()
 Gets the post varible used for the username. More...
 
 sessionValidThru ()
 Returns the time up to the session is valid. More...
 
 listUsers ()
 List all users that are currently available in the storage container. More...
 
 addUser ($username, $password, $additional='')
 Add user to the storage container. More...
 
 removeUser ($username)
 Remove user from the storage container. More...
 
 changePassword ($username, $password)
 Change password for user in the storage container. More...
 
 log ($message, $level=AUTH_LOG_DEBUG)
 Log a message from the Auth system. More...
 
 _loadLogger ()
 Load Log object if not already loaded. More...
 
 attachLogObserver (&$observer)
 Attach an Observer to the Auth Log Source. More...
 
 _isAdvancedSecurityEnabled ($feature=null)
 Is advanced security enabled? More...
 
- Public Member Functions inherited from ilAuthBase
 supportsRedirects ()
 Returns true, if the current auth mode allows redirects to e.g the login screen, public section ... More...
 
 getContainer ()
 Get container object. More...
 
 getExceededUserName ()
 
- Protected Member Functions inherited from ilAuthBase
 initAuth ()
 Init auth object Enable logging, set callbacks... More...
 
 loginObserver ($a_username, $a_auth)
 Called after successful login. More...
 
 failedLoginObserver ($a_username, $a_auth)
 Called after failed login. More...
 
 checkAuthObserver ($a_username, $a_auth)
 Called after each check auth request. More...
 
 logoutObserver ($a_username, $a_auth)
 Called after logout. More...
 
- Protected Attributes inherited from ilAuthBase
 $sub_status = null
 
 $exceeded_user_name
 

Detailed Description

Class SOAPAuth.

SOAP Authentication class.

Definition at line 34 of file class.ilSOAPAuth.php.

Member Function Documentation

◆ testConnection()

static ilSOAPAuth::testConnection (   $a_ext_uid,
  $a_soap_pw,
  $a_new_user 
)
static

Constructor public.

Test connection with values of soap auth administration settings

Definition at line 46 of file class.ilSOAPAuth.php.

References $ilSetting, and $namespace.

47  {
48  global $ilSetting;
49 
50  $settings = $ilSetting->getAll();
51 
52  $server_hostname = $settings["soap_auth_server"];
53  $server_port = (int) $settings["soap_auth_port"];
54  $server_uri = $settings["soap_auth_uri"];
55  $namespace = $settings["soap_auth_namespace"];
56  $use_dotnet = $settings["soap_auth_use_dotnet"];
57  if ($settings["soap_auth_use_https"])
58  {
59  $uri = "https://";
60  }
61  else
62  {
63  $uri = "http://";
64  }
65 
66  $uri.= $server_hostname;
67 
68  if ($server_port > 0)
69  {
70  $uri.= ":".$server_port;
71  }
72 
73  if ($server_uri != "")
74  {
75  $uri.= "/".$server_uri;
76  }
77 
78  $soap_client = new nusoap_client($uri);
79  if ($err = $soap_client->getError())
80  {
81  return "SOAP Authentication Initialisation Error: ".$err;
82  }
83 
84  $soapAction = "";
85  $nspref = "";
86  if ($use_dotnet)
87  {
88  $soapAction = $namespace."/isValidSession";
89  $nspref = "ns1:";
90  }
91 
92  $valid = $soap_client->call('isValidSession',
93  array($nspref.'ext_uid' => $a_ext_uid,
94  $nspref.'soap_pw' => $a_soap_pw,
95  $nspref.'new_user' => $a_new_user),
96  $namespace,
97  $soapAction);
98 
99  return
100  "<br>== Request ==".
101  '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->request)), ENT_QUOTES) . '</pre><br>'.
102  "<br>== Response ==".
103  "<br>Valid: -".$valid["valid"]."-".
104  '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->response)), ENT_QUOTES) . '</pre>';
105  }
if($err=$client->getError()) $namespace
[nu]soapclient higher level class for easy usage.
Definition: nusoap.php:7059
global $ilSetting
Definition: privfeed.php:40

Field Documentation

◆ $valid

ilSOAPAuth::$valid = array()

Definition at line 36 of file class.ilSOAPAuth.php.


The documentation for this class was generated from the following file: