Open-Xchange servlet for external login masks: Difference between revisions

From Open-Xchange
(Redirected page to OXSessionFormLogin)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Open-Xchange servlet for external login masks  =
#REDIRECT [[OXSessionFormLogin]]
 
'''Note: This document describes the new mechanism as introduced with 6.20. This is the [[Open-Xchange_servlet_for_external_login_masks_old|old version]].
'''
 
== Who should read this document ==
 
This document is written for web developers who would like to create a custom login mask for the Open-Xchange server. The login mask can reside on an external server i. e., not directly located in the domain of the Open-Xchange machines. It is also intended for administrators who install and maintain Open-Xchange services.
 
== Description ==
 
The Open-Xchange [[HTTP_API#Form_Login_.28since_6.20.29|HTTP API]] has a function to
create a session from external.
 
In order for this mechanism to work, you need to set <tt>com.openexchange.sessiond.autologin=true</tt> in <tt>/opt/open-xchange/etc/groupware/sessiond.properties</tt>
 
== Example form ==
 
A recent version of this sample can be found in the open-xchange package within the directory in /usr/share/doc.
 
<pre>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="cache-control" content="no-cache">
<title>Login</title>
<script type="text/javascript">
function uuid() {
    function hex(len, x) {
        if (x === undefined) x = Math.random();
        var s = new Array(len);
        for (var i = 0; i < len; i++) {
            x *= 16;
            var digit = x & 15;
            s[i] = digit + (digit < 10 ? 48 : 87); // '0' and 'a' - 10
        }
        return String.fromCharCode.apply(String, s);
    }
    return [hex(8), "-", hex(4), "-4", hex(3), "-", hex(4, 0.5 + Math.random() / 4), "-", hex(12)].join("");
}
</script>
</head>
<body>
<form action="/ajax/login?action=formlogin&authId=" method="post" onSubmit="this.action += uuid();">
<p>
<label for="login">Username: </label>
<input type="text" name="login" id="login"><br>
<label for="password">Password:  </label>
<input type="password" name="password" id="password"><br>
<input type="submit" value="Login">
<input type="hidden" name="client" value="com.openexchange.ox.gui.dhtml">
<input type="hidden" name="version" value="Form Login">
<input type="hidden" name="autologin" value="true">
<input type="hidden" name="uiWebPath" value="/ox6/index.html">
</p>
</form>
</body>
</html>
</pre>
 
[[Category: OX6]]

Latest revision as of 06:18, 18 July 2013

Redirect to: