Changeset 4019
- Timestamp:
- 07/08/10 21:30:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs
r4018 r4019 269 269 } 270 270 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> 271 281 public override bool DeleteUser(string username, bool deleteAllRelatedData) { 272 282 using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) { … … 374 384 } 375 385 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> 376 397 public override string GetPassword(string username, string answer) { 377 398 if (PasswordFormat == MembershipPasswordFormat.Hashed) … … 390 411 } 391 412 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> 392 421 public override MembershipUser GetUser(string username, bool userIsOnline) { 393 422 using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) { … … 401 430 } 402 431 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> 403 442 public override MembershipUser GetUser(object providerUserKey, bool userIsOnline) { 404 443 long ID = providerUserKey is long ? (long)providerUserKey : -1; … … 413 452 } 414 453 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> 415 461 public override string GetUserNameByEmail(string email) { 416 462 using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) { … … 427 473 } 428 474 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> 429 484 public override string ResetPassword(string username, string answer) { 430 485 throw new NotSupportedException("Restet password not avaliable"); 431 486 } 432 487 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> 433 497 public bool LockUser(string userName) { 434 498 using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) { … … 453 517 } 454 518 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> 455 528 public override bool UnlockUser(string userName) { 456 529 using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) { … … 475 548 } 476 549 550 551 /// <summary> 552 /// Update existend user 553 /// </summary> 554 /// <param name="user"></param> 555 /// <returns> 556 /// </returns> 477 557 public override void UpdateUser(MembershipUser user) { 478 558 using (DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext()) { … … 584 664 private readonly byte[] _rgbIv = new byte[] { 60, 121, 178, 142, 50, 160, 226, 84, 41, 66, 158, 180, 26, 232, 42, 113 }; 585 665 666 /// <summary> 667 /// encrypt passwort 668 /// </summary> 669 /// <param name="password"></param> 670 /// <returns> 671 /// return encrypted password 672 /// </returns> 586 673 protected override byte[] EncryptPassword(byte[] password) { 587 674 SymmetricAlgorithm sa = Aes.Create(); … … 594 681 return encryptedTextBytes; 595 682 } 596 683 /// <summary> 684 /// decrypt passwort 685 /// </summary> 686 /// <param name="password"></param> 687 /// <returns> 688 /// return decrypted password 689 /// </returns> 597 690 protected override byte[] DecryptPassword(byte[] encodedPassword) { 598 691 SymmetricAlgorithm sa = Aes.Create();
Note: See TracChangeset
for help on using the changeset viewer.