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.

type = 'system'
users: dict
authenticate(method, credentials)

Authenticate a user.

Parameters:
  • method – Authentication method.

  • credentials – Credentials object.

Returns:

An authenticated User or None if authentication failed.

configure()

Configuration hook.

get_user(local_uid)

Get a User from its local uid.

Parameters:

local_uid – User local uid.

Returns:

A User or None.

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.