Enter search terms or a module, class or function name.
Bases: django.db.models.base.Model
This class represents an Authenticator inside the platform. Sample authenticators are LDAP, Active Directory, SAML, ...
Returns all authenticators ordered by priority
Used to invoke the Service class “Destroy” before deleting it from database.
The main purpuse of this hook is to call the “destroy” method of the object to delete and to clear related data of the object (environment data such as own storage, cache, etc...
Note: | If destroy raises an exception, the deletion is not taken. |
---|
Returns an environment valid for the record this object represents
Instantiates the object this record contains.
Every single record of Provider model, represents an object.
Raises:
Used to get or create a new user at database associated with this authenticator.
This user has all parameter default, that are: * ‘real_name’:realName * ‘last_access’:NEVER * ‘state’:State.ACTIVE
username: The username to create and associate with this auhtenticator
realName: If None, it will be the same that username. If otherwise especified, it will be the default real_name (field)
True if the ip can access this Transport.
False if the ip can’t access this Transport.
The ip check is done this way: * If The associated network is empty, the result is always True * If the associated network is not empty, and nets_positive (field) is True, the result will be True if the ip is contained in any subnet associated with this transport. * If the associated network is empty, and nets_positive (field) is False, the result will be True if the ip is NOT contained in ANY subnet associated with this transport.
Raises:
Get the type of the object this record represents.
The type is Python type, it obtains this type from ServiceProviderFactory and associated record field.
Note: | We only need to get info from this, not access specific data (class specific info) |
---|
Checks the validity of an user
username: Name of the user to check
falseIfNotExists: Defaults to True. It is used so we can return a value defined by caller.
One example of falseIfNotExists using as True is for checking that the user is active or it doesn’t exists.
This is done so we can check non existing or non blocked users (state != Active, or do not exists)
Bases: django.db.models.base.Model
This class represents a single user, associated with one authenticator
Used to invoke the Service class “Destroy” before deleting it from database.
In this case, this method ensures that the user has no userServices assigned and, if it has, mark those services for removal
Note: | If destroy raises an exception, the deletion is not taken. |
---|
Returns the authenticator object that owns this user.
Note: | The returned value is an instance of the authenticator class used to manage this user, not a db record. |
---|
Return the username transformed for authentication. This transformation is used for transports only, not for transforming anything at login time. Transports that will need the username, will invoke this method. The manager (an instance of uds.core.auths.Authenticator), can transform the database stored username so we can, for example, add @domain in some cases.
Return true if this user is admin or staff member
Invoked to log out this user
Returns the preferences for this user for the provided module name.
Usually preferences will be associated with transports, but can be preferences registered by ANY module.
Returns:
The preferences for the module specified as a dictionary (can be empty if module is not found).
If the module exists, the preferences will always contain something, but may be the values are the default ones.
Updates the last access for this user with the current time of the sql server
Bases: django.db.models.base.Model
This class represents a group, associated with one authenticator
Used to invoke the Service class “Destroy” before deleting it from database.
In this case, this is a dummy method, waiting for something useful to do :-)
Note: | If destroy raises an exception, the deletion is not taken. |
---|
Returns the authenticator object that owns this user.
Note: | The returned value is an instance of the authenticator class used to manage this user, not a db record. |
---|
Bases: django.db.models.base.Model
This class represents a single user preference for an user and a module