Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using Nancy.Security;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9.  
  10. namespace Authentication
  11. {
  12.     public class AuthenticatedUser : IUserIdentity
  13.     {
  14.         [Column("id")]
  15.         [Key]
  16.         public int Id { get; set; }
  17.  
  18.         [Column("guid")]
  19.         public Guid Identifier { get; set; }
  20.  
  21.         [Column("username")]
  22.         public string UserName { get; set; }
  23.  
  24.         [Column("email")]
  25.         [DataType(DataType.EmailAddress)]
  26.         public string Email { get; set; }
  27.  
  28.         [Column("password")]
  29.         public string Password { get; set; }
  30.  
  31.         [Column("claims")]
  32.         public string ClaimSource { get; set; }
  33.  
  34.         [NotMapped]
  35.         public IEnumerable<string> Claims
  36.         {
  37.             get
  38.             {
  39.                 return ClaimSource.Split(',');
  40.             }
  41.  
  42.             set
  43.             {
  44.                 ClaimSource = String.Join(",", value);
  45.             }
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement