AppSuite:ExternalLoginPage: Difference between revisions

From Open-Xchange
 
(4 intermediate revisions by 2 users not shown)
Line 8: Line 8:
== HTML ==
== HTML ==


The Open-Xchange [[HTTP_API#Form_Login_.28since_6.20.29|HTTP API]] has a function to
The Open-Xchange [https://documentation.open-xchange.com/latest/middleware/http_api.html HTTP API (Form login)] has a function to
create a session from external.
create a session from external.


The full detailed explanation how the HTML form is used and errors can be handled can be found here:
The full detailed explanation how the HTML form is used and errors can be handled can be found here:


[[OXSessionFromLogin|OX Session Formlogin]]
[[OXSessionFormLogin|OX Session Formlogin]]


== Redirect to custom login ==
== Redirect to custom login ==
Line 19: Line 19:
Users can still access the original product login site. If this is not wanted the following Apache  
Users can still access the original product login site. If this is not wanted the following Apache  
configuration for your VirtualHost can be used to redirect all requests to your custom login page:
configuration for your VirtualHost can be used to redirect all requests to your custom login page:
before 7.8.0:


  RewriteEngine On
  RewriteEngine On
  RewriteRule ^/appsuite/signin /custom-login.html [R]
  RewriteRule ^/appsuite/signin /custom-login.html [R]


Since 7.8.0 it can be configured directly in <code>/opt/open-xchange/etc/as-config.yml</code>
<pre>
# Override certain settings
default:
    host: all
    loginLocation: 'http://example.com/appsuite/mycustomlogin.html'
</pre>
Note: you need to have the right syntax (like leading spaces) in the .yml file.
It is possible to have different login pages for different domains, just add another section with a different host: <mydomain.com> line.


== Setting custom login as logout location ==
== Setting custom login as logout location ==
Line 35: Line 47:


in '''/opt/open-xchange/etc/as-config.yml'''. This setting takes effect for example if an autologin session is expired. as-config.yml itself defines settings in dependence of the hostname configured for the Open-Xchange access.
in '''/opt/open-xchange/etc/as-config.yml'''. This setting takes effect for example if an autologin session is expired. as-config.yml itself defines settings in dependence of the hostname configured for the Open-Xchange access.
If both settings are defined for a user, io.ox/core//customLocations/logout will be used.

Latest revision as of 10:59, 8 July 2019

How to set up an external login page for App Suite

Who should read this document

This document is written for web developers who would like to create a custom login mask for the OX App Suite. 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.


HTML

The Open-Xchange HTTP API (Form login) has a function to create a session from external.

The full detailed explanation how the HTML form is used and errors can be handled can be found here:

OX Session Formlogin

Redirect to custom login

Users can still access the original product login site. If this is not wanted the following Apache configuration for your VirtualHost can be used to redirect all requests to your custom login page:

before 7.8.0:

RewriteEngine On
RewriteRule ^/appsuite/signin /custom-login.html [R]

Since 7.8.0 it can be configured directly in /opt/open-xchange/etc/as-config.yml

# Override certain settings
default:
    host: all
    loginLocation: 'http://example.com/appsuite/mycustomlogin.html'

Note: you need to have the right syntax (like leading spaces) in the .yml file.

It is possible to have different login pages for different domains, just add another section with a different host: <mydomain.com> line.

Setting custom login as logout location

If users should be directed to the custom login form after logout from App Suite the following property can be set globally somewhere in /opt/open-xchange/etc/settings/. Either create a new properties file or add the option in any existing one. For more complex setups e.g. with different brands please check out how to set this property in context or user scope which is explained here.

io.ox/core//customLocations/logout=https://login.example.com

For cases where only one custom login page exists for all users it's also recommended to set

logoutLocation: 'https://login.example.com/'

in /opt/open-xchange/etc/as-config.yml. This setting takes effect for example if an autologin session is expired. as-config.yml itself defines settings in dependence of the hostname configured for the Open-Xchange access.

If both settings are defined for a user, io.ox/core//customLocations/logout will be used.