public static Status BuildStatus(string code, string message = null) { return(new Status { StatusMessage = message, StatusCode = ResponseFactoryMock.GetStatusCode(code, null) }); }
public static TokenResponse GetTokenResponseSuccess(string inResponseTo) { var response = ResponseFactoryMock.GetTokenResponse(inResponseTo, StatusCodes.Success); var assertion = AssertionFactroryMock.BuildAssertion(); var token = AssertionFactroryMock.GetToken(assertion); var assertionElement = AssertionFactroryMock.SerialiseToken(token); response.Assertions = new XmlElement[] { assertionElement }; return(response); }
public static LogoutResponse GetLogoutResponse(string inResponseTo, string statusCode) { var response = new LogoutResponse { ID = "Test_" + Guid.NewGuid().ToString(), Destination = "http://localhost:59611/", IssueInstant = DateTime.UtcNow, InResponseTo = inResponseTo, Status = ResponseFactoryMock.BuildStatus(statusCode, null), Issuer = new NameId { Value = "https://dg-mfb/idp/shibboleth", Format = NameIdentifierFormats.Entity } }; return(response); }