UserContext Class |
Namespace: NetQuarry.Security
The UserContext type exposes the following members.
Name | Description | |
---|---|---|
UserContext |
Creates a UserContext object.
|
Name | Description | |
---|---|---|
Answer |
Returns the PasswordAnswer
| |
Attributes |
A bitmask of UserAttrs values.
| |
AuthenticationProviderType |
Gets/Sets the type of the authentication provider
| |
DeviceID |
Gets/Sets the user's device ID
| |
DeviceToken |
Gets/Sets the device token. The device token is permanent and can be used to login as the user in a web service.
| |
EmailAddress |
Returns the EmailAddress
| |
EncryptedPassword |
Returns the password encrypted
| |
HasMinimalAccess |
Gets whether or not the user has minimal access. Currently this is only the case when the
ForcePasswordChange attribute is set.
| |
ID |
Returns the User ID
| |
InCompliance |
Identifies whether or not the user is in compliance with all current
user agreements and other introductory material.
Note that InCompliance does not determine if compliance has been met, it is just
used to expose the compliance state as determined during login and similar activities.
Use DetermineCompliance to actively interrogate the database as to
compliance state (that method will update InCompliance).
| |
IsValid |
Returns true if the object is valid.
| |
Name |
Returns the User name
| |
PackageLevelID |
Gets/Sets the package_level_id from the users view/table
| |
Password |
Returns the Password
| |
Profiles |
Returns the list of user profiles
| |
ProxyUserID |
Gets/Sets the Proxy ID for this object. This is used when logging on behalf of another user.
| |
Question |
Returns the Password Question
| |
Signature |
Sets the signature for this user. This property should be set during startup.
| |
StartPage |
Returns the start page
| |
Token |
Returns the user token
| |
UserGUID |
Gets/Sets the UserGUID for this object.
|
Name | Description | |
---|---|---|
BuildProfileRolesCollection |
Returns a NameValueCollection of the profile/roles map including all potential roles in the database.
This collection can be used to provide the set of valid roles to Authenticate(String, String, NameValueCollection, Int64)
when validating a user.
| |
ChangePassword |
Change the current password
| |
ClearTokens |
Clears ALL user tokens for this user.
| |
Clone |
Returns a copy of this object.
| |
DetermineCompliance |
Determines if the current user is in compliance with all current user agreements and other
introductory material (InCompliance). If the user is not currently marked as
InCompliance then the database will be interrogated to determine whether the
user is actually in compliance and update the InCompliance value accordingly.
This method is primarily intended for use during login and similar activities and otherwise
you should generally use InCompliance. | |
Equals | (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetDirectLoginURL |
Returns a direct login URL
BugzID: 92963 - Platform way to get a one-time login url for a user id
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetProviderType |
Returns the type of the provider to use for this application
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasPermission |
Returns true if the specified object "has" the permission. If the object has no assigned permisions,
the return value is true.
| |
HasProfile |
Checks the list of profiles for a specific match.
| |
Load |
Loads the UserContext object by looking up the token in the database
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Permissions |
Returns a bitmask of the object's permissions. If the object has no assigned permissions,
the return value is 0xffffffff (All permission bits are set)
| |
Persist(IAppContext) |
Creates a token and caches it to the local (meta) database
| |
Persist(IAppContext, String) |
Caches the current credentials to the database using the specified token.
| |
PersistDeviceToken |
Creates or looks up the device token for the current user, device, and os
| |
RefreshPermissions(IAppContext) |
Reloads the permissions for this UserContext.
| |
RefreshPermissions(String, String) |
Refresh permissions for a specific object.
The specified ID should be the ID of the object itself, or of its parent object, depending on the type of object.
For example, when refreshing permissions for "page_element" the ID should be the ID of the parent PageInfo.
Note that this method is primarily intended for internal platform use.
| |
RemoveDeviceToken |
If non admin user: removes the current device token OR removes all device tokens of the current user so that they are no longer valid.
If admin user: can remove device token(s) of a different user if the other user's info is specified in the arguments. Otherwise works like non admin user.
| |
RemoveToken |
Removes the user token from the database
| |
ResetPassword |
Sets the password to null, sets the ForcePasswordChange attribute on the user
and (optionally) sends the user a way to reset it via email.
| |
Restore |
Restores the UserContext object by looking up the data from the users table
| |
SendPassword |
Sends the user id and password in clear text in an email message to the user.
| |
ToString | (Inherited from Object.) | |
UpdateToken |
Updates the token record to the current time.
|
Name | Description | |
---|---|---|
EqualValue |
Determines if the object value is equal to another object. If the two objects are null, then this returns true.
There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways).
If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.) |