Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4019


Ignore:
Timestamp:
07/08/10 21:30:45 (14 years ago)
Author:
jwolfing
Message:

added comments of the other methods (#1079)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs

    r4018 r4019  
    269269    }
    270270
     271
     272    /// <summary>
     273    /// delete a specified user from the membership data
     274    /// </summary>
     275    /// <param name="username"></param>
     276    /// <param name="deleteAllRelatedData"></param>
     277    /// <returns>
     278    /// return a true if was possible to delete the user
     279    /// return false if the db connection not exist or a exception occour
     280    /// </returns>
    271281    public override bool DeleteUser(string username, bool deleteAllRelatedData) {
    272282      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
     
    374384    }
    375385
     386
     387    /// <summary>
     388    /// return the right password of the user
     389    /// the user has do give the right answer to a question
     390    /// to get his password information
     391    /// </summary>
     392    /// <param name="username"></param>
     393    /// <param name="answer"></param>
     394    /// <returns>
     395    /// return a string type of the right password
     396    /// </returns>
    376397    public override string GetPassword(string username, string answer) {
    377398      if (PasswordFormat == MembershipPasswordFormat.Hashed)
     
    390411    }
    391412
     413    /// <summary>
     414    /// get a user of the type of the Membershipuser
     415    /// </summary>
     416    /// <param name="username"></param>
     417    /// <param name="userisOnline"></param>
     418    /// <returns>
     419    /// returns the searched membershipuser
     420    /// </returns>
    392421    public override MembershipUser GetUser(string username, bool userIsOnline) {
    393422      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
     
    401430    }
    402431
     432
     433    /// <summary>
     434    /// search a user over the providerUserKey and return
     435    /// the right membershipuser
     436    /// </summary>
     437    /// <param name="providerUserKey"></param>
     438    /// <param name="userIsOnline"></param>
     439    /// <returns>
     440    /// return the right membershipuser
     441    /// </returns>
    403442    public override MembershipUser GetUser(object providerUserKey, bool userIsOnline) {
    404443      long ID = providerUserKey is long ? (long)providerUserKey : -1;
     
    413452    }
    414453
     454    /// <summary>
     455    /// search over the email the right username
     456    /// </summary>
     457    /// <param name="email"></param>
     458    /// <returns>
     459    /// return a string with the username
     460    /// </returns>
    415461    public override string GetUserNameByEmail(string email) {
    416462      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
     
    427473    }
    428474
     475    /// <summary>
     476    /// after the question user have to give the right answer
     477    /// then here will the password reseted
     478    /// </summary>
     479    /// <param name="username"></param>
     480    /// <param name="answer"></param>
     481    /// <returns>
     482    /// return new password
     483    /// </returns>
    429484    public override string ResetPassword(string username, string answer) {
    430485      throw new NotSupportedException("Restet password not avaliable");
    431486    }
    432487
     488
     489    /// <summary>
     490    /// Lock a specified user over the username
     491    /// </summary>
     492    /// <param name="username"></param>
     493    /// <returns>
     494    /// return true if was possible and
     495    /// flase if there was a exception
     496    /// </returns>
    433497    public bool LockUser(string userName) {
    434498      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
     
    453517    }
    454518
     519
     520    /// <summary>
     521    /// unlock specified user over the username
     522    /// </summary>
     523    /// <param name="username"></param>
     524    /// <returns>
     525    /// return true if was possible and
     526    /// false if not
     527    /// </returns>
    455528    public override bool UnlockUser(string userName) {
    456529      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
     
    475548    }
    476549
     550
     551    /// <summary>
     552    /// Update existend user
     553    /// </summary>
     554    /// <param name="user"></param>
     555    /// <returns>
     556    /// </returns>
    477557    public override void UpdateUser(MembershipUser user) {
    478558      using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) {
     
    584664    private readonly byte[] _rgbIv = new byte[] { 60, 121, 178, 142, 50, 160, 226, 84, 41, 66, 158, 180, 26, 232, 42, 113 };
    585665
     666    /// <summary>
     667    /// encrypt passwort
     668    /// </summary>
     669    /// <param name="password"></param>
     670    /// <returns>
     671    /// return encrypted password
     672    /// </returns>
    586673    protected override byte[] EncryptPassword(byte[] password) {
    587674      SymmetricAlgorithm sa = Aes.Create();
     
    594681      return encryptedTextBytes;
    595682    }
    596 
     683    /// <summary>
     684    /// decrypt passwort
     685    /// </summary>
     686    /// <param name="password"></param>
     687    /// <returns>
     688    /// return decrypted password
     689    /// </returns>
    597690    protected override byte[] DecryptPassword(byte[] encodedPassword) {
    598691      SymmetricAlgorithm sa = Aes.Create();
Note: See TracChangeset for help on using the changeset viewer.