Skip to content

Login Widget

Tobias Paczian edited this page Mar 28, 2018 · 2 revisions

image
The login widget offers a login interface for one or multiple authentication providers which performs the login and then displays user data.

options

  • callback - function that is called when an action is performed. The function will get passed an object with the properties action and result. The action can be one of [ 'login', 'logout' ] and the result is one of [ 'success', 'failed' ]. If a login action succeeds, the additional properties token and user will be passed. Default is null.
  • cookiename - name of the cookie to store the user information in. Default is mgauth.
  • authResources - an object where each property is pointing to an authentication resource configuration. By default this will be read from RetinaConfig.authResources. The special key default is a string that is the name of the default authentication resource configuration. A resource configuration has the following properties.
    • icon - file name of the icon to be used in the drop-down for the auth provider selection. Must be in the images directory in the base HTML directory.
    • prefix - prefix put before the base64 encode of login:password to be sent to the auth provider.
    • keyword - name of the header field or CGI param to send the authentication in.
    • url - URL of the auth provider
    • useHeader - boolean whether or not to use the header field. If this is false the keyword will be used as the name of the CGI param to send the auth information in.
    • loginField - name of the field in the return structure from the auth provider that is considered the login. Default is login.
  • registerEnabled - boolean whether the login form should contain a registration link.
  • registerLink - link to the registration URL
  • helpEnabled - boolean whether the help is enabled as a button next to the login button.
  • helpMenu - optional array of objects with the properties title and url which if present causes the help button to not be a link but a drop-down menu of help items.
  • helpLink - URL of the help link if helpMenu is not used.
  • forgotEnabled - boolean whether the login box contains a forgot password link.
  • forgotLink - URL of the forgot password page
  • myDataEnabled - boolean whether the user information should contain a myData button.
  • myDataLink - URL of the myData page

Clone this wiki locally