Ejemplo n.º 1
0
 public AuthResponse ValidateToken(string recoveryToken)
 {
     var apiObject = new ApiObject();
     apiObject.SetProperty("recoveryToken", recoveryToken);
     var response = BaseClient.Post(resourcePath + Constants.RecoveryEndpoint + Constants.TokenEndpoint, apiObject.ToJson());
     return Utils.Deserialize<AuthResponse>(response);
 }
Ejemplo n.º 2
0
 public AuthResponse GetStatus(string stateToken)
 {
     var apiObject = new ApiObject();
     apiObject.SetProperty("stateToken", stateToken);
     var response = BaseClient.Post(resourcePath, apiObject.ToJson());
     return Utils.Deserialize<AuthResponse>(response);
 }
Ejemplo n.º 3
0
 public AuthResponse ActivateTotpFactor(string stateToken, AuthResponse authResponse, string passCode)
 {
     var apiObject = new ApiObject();
     apiObject.SetProperty("passCode", passCode);
     var nextLink = authResponse.Links["next"].First();
     return Execute(stateToken, nextLink, apiObject);
 }
Ejemplo n.º 4
0
 public AuthResponse Execute(string stateToken, Uri uri, ApiObject apiObject = null)
 {
     // Create a new apiObject if it's null, because we need to add a stateToken
     apiObject = apiObject ?? new ApiObject();
     apiObject.SetProperty("stateToken", stateToken);
     var response = BaseClient.Post(uri, apiObject.ToJson());
     return Utils.Deserialize<AuthResponse>(response);
 }
Ejemplo n.º 5
0
 public AuthResponse Execute(string stateToken, Link link, ApiObject apiObject = null)
 {
     return Execute(stateToken, link.Href, apiObject);
 }