Click or drag to resize

GenericAuthenticationProvider Class

Base class for implementing an IAuthenticationProvider user-authentication provider. When used as the authentication provider itself (rather than as a base class for the authentication provider), always authenticates the user regardless of password. To use, derive from this class and override the OnAuthenticate(String, String, NameValueCollection, Int64) method.
Inheritance Hierarchy

Namespace:  NetQuarry.Security
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class GenericAuthenticationProvider : IAuthenticationProvider

The GenericAuthenticationProvider type exposes the following members.

Constructors
  NameDescription
Public methodGenericAuthenticationProvider
Initializes a new instance of the GenericAuthenticationProvider class
Top
Properties
  NameDescription
Public propertyApplication
Gets/Sets an IAppContext object for use by the provider
Public propertyProperties
returns the object's properties collection
Top
Methods
  NameDescription
Public methodAuthenticate(String, Int64)
The implementing class should authenticate the user using the provided token, create and populate a UserContext object adding profiles when an item in the profileRoles collection is supported for this user. If the authentication fails, the implementing class can return a null UserContext object or throw a custom exception.
Public methodAuthenticate(String, String, NameValueCollection, Int64)
This class authenticates the user always, regardless of the user or password.
Public methodChangePassword
Changes the password for the user. Use ChangeUserPassword(IAppContext, String, String, String) if you need the new password in a form (raw vs. encrypted) for storing in Password.
Public methodChangeUserPassword
Changes the password for the user. Performs the same functionality as ChangePassword(IAppContext, String, String, String) except that it returns the new password (raw for two-way encryptions, encrypted for one-way encryptions) as is appropriate for storing in Password.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Protected methodGetText
Helper method for getting localized error messages.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnAuthenticate
Method that does the actual authentication. Called only by the Authenticate(String, Int64) method in this class. Note that this implementation (the Generic provider) creates a user context regardless of the password
Public methodResetPassword
Sets the password to null, sets the ForcePasswordChange attribute on the user and (optionally) sends the user a way to reset it via email.
Public methodRestore
Restore the user context from a user id. Used when a password is lost and you want to send the user a new password.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
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.)
Top
See Also