Source code for dazzler.components.auth._logout
"""Autogenerated file: DO NOT EDIT!"""
import typing # noqa: F401
from dazzler.system import Component, Aspect, UNDEFINED # noqa: F401
[docs]class Logout(Component):
"""
A logout button.
:CSS:
- ``dazzler-auth-logout``
- ``logout-button``
"""
logout_url = Aspect(required=True, docstring="Logout url")
next_url = Aspect(docstring="Redirect to this page after logout.")
label = Aspect(default='Logout', docstring="Label of the logout button. (default='Logout')") # noqa: E501
method = Aspect(default='POST', docstring="Method to submit the logout form. (default='POST')") # noqa: E501
class_name = Aspect(docstring="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.") # noqa: E501
style = Aspect(docstring="Style object for the top level wrapper of the component.") # noqa: E501
[docs] def __init__(
self,
logout_url: str,
next_url: typing.Optional[str] = UNDEFINED,
label: typing.Optional[str] = 'Logout',
method: typing.Optional[str] = 'POST',
class_name: typing.Optional[str] = UNDEFINED,
style: typing.Optional[typing.Dict] = UNDEFINED,
identity: str = None
):
"""
:param logout_url: Logout url
:param next_url: Redirect to this page after logout.
:param label: Label of the logout button. (default='Logout')
:param method: Method to submit the logout form. (default='POST')
:param 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.
:param style: Style object for the top level wrapper of the
component.
"""
Component.__init__(self, locals(), identity)