gws.base.auth.system_provider

Source code: gws.base.auth.system_provider

Module Contents

class gws.base.auth.system_provider.Object

Bases: gws.AuthProvider

Authentication Provider.

users: dict
type = 'system'
configure()

Configuration hook.

authenticate(method, credentials)

Authenticate a user.

Parameters:
  • method – Authentication method.

  • credentials – Credentials object.

Returns:

An authenticated User or None if authentication failed.

serialize_user(user)

Return a string representation of a User.

Parameters:

user – A User object.

Returns:

A json string.

unserialize_user(data)

Restore a User object from a serialized representation.

Parameters:

ser – A json string.

Returns:

A User object.

get_user(local_uid)

Get a User from its local uid.

Parameters:

local_uid – User local uid.

Returns:

A User or None.