Documentation
¶
Index ¶
- func AssertContains(t *testing.T, recorder *httptest.ResponseRecorder, expected string)
- func AssertHTTPStatus(t *testing.T, recorder *httptest.ResponseRecorder, expectedStatus int)
- func AssertNotContains(t *testing.T, recorder *httptest.ResponseRecorder, unexpected string)
- func Base64DecodeSAML(encoded string) ([]byte, error)
- func Base64EncodeSAML(data []byte) string
- func CompressData(data []byte) ([]byte, error)
- func CreateTestAuthRequest(issuer string) *crewjamsaml.AuthnRequest
- func CreateTestHTTPRequest(method, path string, params map[string]string) *http.Request
- func CreateTestLogoutRequest(issuer, nameID string) *crewjamsaml.LogoutRequest
- func CreateTestLogoutRequestWithTime(issuer, nameID string, issueInstant time.Time) *crewjamsaml.LogoutRequest
- func CreateTestRecorder() *httptest.ResponseRecorder
- func GenerateTestCertificate(t *testing.T, commonName string) (*x509.Certificate, *rsa.PrivateKey)
- func GenerateTestCertificatePEM(t *testing.T, commonName string) ([]byte, []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContains ¶
func AssertContains(t *testing.T, recorder *httptest.ResponseRecorder, expected string)
AssertContains asserts that the response body contains the expected string.
func AssertHTTPStatus ¶
func AssertHTTPStatus(t *testing.T, recorder *httptest.ResponseRecorder, expectedStatus int)
AssertHTTPStatus asserts that the HTTP response has the expected status code.
func AssertNotContains ¶
func AssertNotContains(t *testing.T, recorder *httptest.ResponseRecorder, unexpected string)
AssertNotContains asserts that the response body does not contain the string.
func Base64DecodeSAML ¶
Base64DecodeSAML decodes base64 encoded SAML data.
func Base64EncodeSAML ¶
Base64EncodeSAML encodes SAML data to base64 (standard encoding).
func CompressData ¶
CompressData compresses data using deflate algorithm (for SAML HTTP-Redirect binding).
func CreateTestAuthRequest ¶
func CreateTestAuthRequest(issuer string) *crewjamsaml.AuthnRequest
CreateTestAuthRequest creates a basic SAML authentication request for testing.
func CreateTestHTTPRequest ¶
CreateTestHTTPRequest creates a test HTTP request with common SAML parameters.
func CreateTestLogoutRequest ¶
func CreateTestLogoutRequest(issuer, nameID string) *crewjamsaml.LogoutRequest
CreateTestLogoutRequest creates a basic SAML logout request for testing.
func CreateTestLogoutRequestWithTime ¶
func CreateTestLogoutRequestWithTime(issuer, nameID string, issueInstant time.Time) *crewjamsaml.LogoutRequest
CreateTestLogoutRequestWithTime creates a SAML logout request with specific issue instant.
func CreateTestRecorder ¶
func CreateTestRecorder() *httptest.ResponseRecorder
CreateTestRecorder creates a new httptest.ResponseRecorder.
func GenerateTestCertificate ¶
func GenerateTestCertificate(t *testing.T, commonName string) (*x509.Certificate, *rsa.PrivateKey)
GenerateTestCertificate creates a test certificate and private key.
Types ¶
This section is empty.