dazzler.components.auth package

class dazzler.components.auth.Login(login_url, next_url=undefined, method='POST', username_label='Username', password_label='Password', submit_label='Login', horizontal=undefined, bordered=undefined, placeholder_labels=undefined, header=undefined, footer=undefined, errors=undefined, class_name=undefined, style=undefined, identity=None)[source]

Bases: dazzler.system._component.Component

A login form to include on dazzler pages.

CSS
  • dazzler-auth-login

  • login-field

  • login-label

  • login-input

  • login-username

  • login-password

  • login-button

__init__(login_url, next_url=undefined, method='POST', username_label='Username', password_label='Password', submit_label='Login', horizontal=undefined, bordered=undefined, placeholder_labels=undefined, header=undefined, footer=undefined, errors=undefined, class_name=undefined, style=undefined, identity=None)[source]
Parameters
  • login_url (str) – The url to perform login.

  • next_url (Optional[str]) – Redirect to this page after login.

  • method (Optional[str]) – Method to submit the login form. (default=’POST’)

  • username_label (Optional[str]) – The label to show before the. (default=’Username’)

  • password_label (Optional[str]) – Label to replace the password. (default=’Password’)

  • submit_label (Optional[str]) – Label for the submit button. (default=’Login’)

  • horizontal (Optional[bool]) – Style the form with the fields side by side.

  • bordered (Optional[bool]) – Apply a border around the

  • placeholder_labels (Optional[bool]) – Put the label in placeholder attribute instead of a <label> element.

  • header (Optional[Any]) – Included as first child of the form. Wrapped under div with CSS class login-header

  • footer (Optional[Any]) – Included at bottom of the login form. Wrapped under div with CSS class login-footer

  • errors (Optional[Dict]) – Form errors

  • class_name (Optional[str]) – Class name automatically added by dazzler api with a prefix for the component library. ie: core component Container become dazzler-core-container. When added on the component, the class names will be concatenated.

  • style (Optional[Dict]) – Style object for the top level wrapper of the component.

bordered

Apply a border around the

class_name

Class name automatically added by dazzler api with a prefix for the component library.ie: core component Container become dazzler-core-container.When added on the component, the class names will be concatenated.

errors

Form errors

footer

Included at bottom of the login form.Wrapped under div with CSS class login-footer

header

Included as first child of the form.Wrapped under div with CSS class login-header

horizontal

Style the form with the fields side by side.

login_url

The url to perform login.

method

Method to submit the login form. (default=’POST’)

next_url

Redirect to this page after login.

password_label

Label to replace the password. (default=’Password’)

placeholder_labels

Put the label in placeholder attribute instead of a <label> element.

style

Style object for the top level wrapper of the component.

submit_label

Label for the submit button. (default=’Login’)

username_label

The label to show before the. (default=’Username’)

class dazzler.components.auth.Logout(logout_url, next_url=undefined, label='Logout', method='POST', class_name=undefined, style=undefined, identity=None)[source]

Bases: dazzler.system._component.Component

A logout button.

CSS
  • dazzler-auth-logout

  • logout-button

__init__(logout_url, next_url=undefined, label='Logout', method='POST', class_name=undefined, style=undefined, identity=None)[source]
Parameters
  • logout_url (str) – Logout url

  • next_url (Optional[str]) – Redirect to this page after logout.

  • label (Optional[str]) – Label of the logout button. (default=’Logout’)

  • method (Optional[str]) – Method to submit the logout form. (default=’POST’)

  • class_name (Optional[str]) – Class name automatically added by dazzler api with a prefix for the component library. ie: core component Container become dazzler-core-container. When added on the component, the class names will be concatenated.

  • style (Optional[Dict]) – Style object for the top level wrapper of the component.

class_name

Class name automatically added by dazzler api with a prefix for the component library.ie: core component Container become dazzler-core-container.When added on the component, the class names will be concatenated.

label

Label of the logout button. (default=’Logout’)

logout_url

Logout url

method

Method to submit the logout form. (default=’POST’)

next_url

Redirect to this page after logout.

style

Style object for the top level wrapper of the component.