Example #1
0
 public static Token RefreshToken(Token entity)
 {
     var principal = AuthManager.GetPrincipal(entity.oauth_token);
     var token = AuthManager.GenerateToken(principal.EnterpriseID, principal.BusinessUnitID, principal.MemberID,
                                           principal.ProviderUserKey, string.Empty, string.Empty);
     AuthManager.DisposeToken(entity.oauth_token);
     return new Token() { oauth_timestamp = DateTime.Now.ToString(), oauth_token = token };
 }
Example #2
0
 public static void Logoff(Token entity)
 {
     try
     {
         AuthManager.DisposeToken(entity.oauth_token);
     }
     catch (Exception ex)
     {
         // do nothing
     }
 }
Example #3
0
File: Auth.cs Project: MPCC/MPCC
 public GetResponse<Token> RefreshToken(Token entity)
 {
     return new GetResponse<Token>() { Entity = AuthRepository.RefreshToken(entity) };
 }
Example #4
0
File: Auth.cs Project: MPCC/MPCC
 public void Logoff(Token entity)
 {
     var cookie = new HttpCookie("_mpcc", string.Empty);
     HttpContext.Current.Response.SetCookie(cookie);
     AuthRepository.Logoff(entity);
 }