gws.plugin.auth_provider.file

Provider for the file-based authorization.

This provider works with a local JSON file, which is expected to contain a list of user “records” (dicts).

A record is required to contain fields login and password (hashed as per gws.lib.password.encode).

Other fields, if given, are converted to respective gws.User properties.

Source code: gws.plugin.auth_provider.file

Package Contents

class gws.plugin.auth_provider.file.Config

Bases: gws.base.auth.provider.Config

File-based authorization provider

path: gws.FilePath

path to the users json file

class gws.plugin.auth_provider.file.Object

Bases: gws.base.auth.provider.Object

db: list[dict]
path: str
authenticate(method, credentials)
configure()
get_user(local_uid)
passwd(p: gws.EmptyRequest)

Encode a password for the authorization file