private static string ClientStateToServer(GpgAuthState state) { switch (state) { case GpgAuthState.Logout: return("logout"); case GpgAuthState.VerifyServer: return("stage0"); case GpgAuthState.DecryptToken: return("stage1"); case GpgAuthState.VerifyToken: return("stage2"); case GpgAuthState.Complete: return("complete"); default: throw new ArgumentOutOfRangeException(nameof(state), state, null); } }
/// <summary> /// Validates the recieved headers are valid in this state. /// </summary> /// <param name="headers">The response headers.</param> /// <param name="state"></param> public static void Validate(HttpResponseHeaders headers, GpgAuthState state) { var validator = new GpgAuthHeaders(headers, state); validator.Validate(); }
private GpgAuthHeaders(HttpResponseHeaders headers, GpgAuthState state) { _headers = headers; _state = state; }