gws.base.database.auth_provider¶
Base authorization provider that checks users with SQL queries.
Source code: gws.base.database.auth_provider
Module Contents¶
- class gws.base.database.auth_provider.Config¶
Bases:
gws.base.auth.provider.ConfigSQL-based authorization provider
- class gws.base.database.auth_provider.Object¶
Bases:
gws.base.auth.provider.ObjectAuthorization provider that checks credentials and loads users with SQL queries.
- db: gws.DatabaseProvider¶
Database provider the queries run on.
- authenticate(method, credentials)¶
- configure()¶
- configure_provider()¶
Set the database provider from the configuration.
- Returns:
Trueif a provider was found.- Raises:
gws.Error – If no matching database provider is configured.
- get_user(local_uid)¶
- class gws.base.database.auth_provider.Placeholders¶
Bases:
gws.EnumPlaceholder names available in the SQL queries.
- password = 'password'¶
Password from the credentials.
- token = 'token'¶
Token from the credentials.
- uid = 'uid'¶
Local user id, used in
getUserSql.
- username = 'username'¶
User name from the credentials.