user.models.user
¶
Module Contents¶
Classes¶
dict() -> new empty dictionary |
|
Defines a generic user. |
- class user.models.user.SessionDict[source]¶
Bases:
typing_extensions.TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class user.models.user.User[source]¶
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.TimestampMixin
,onegov.search.ORMSearchable
Defines a generic user.
- property es_suggestion: tuple[str, str][source]¶
Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere.
If a single string is returned, the completion input equals the completion output. (My Title -> My Title)
If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title)
- property yubikey_serial: int | None[source]¶
Returns the yubikey serial of the yubikey associated with this user (if any).
- sessions: onegov.core.orm.mixins.dict_property[dict[str, SessionDict] | None][source]¶
- is_matching_password(password: str) bool [source]¶
Returns True if the given password (cleartext) matches the stored password hash.
- classmethod get_initials(username: str, realname: str | None = None) str [source]¶
Takes the name and returns initials which are at most two characters wide.
Examples:
admin => A nathan.drake@example.org => ND Victor Sullivan => VS Charles Montgomery Burns => CB
- cleanup_sessions(app: onegov.core.framework.Framework) None [source]¶
Removes stored sessions not valid anymore.
- save_current_session(request: onegov.core.request.CoreRequest) None [source]¶
Stores the current browser session.