Skip to content

Commit fed16f6

Browse files
test: add tests for GitHub OAuth authentication URLs
Add test cases to verify GitHub OAuth URL pattern matching: - github.com - github.concur.com (GitHub Enterprise) - github.example.com (custom GitHub Enterprise domains) - Negative test cases for non-OAuth GitHub URLs
1 parent 1698191 commit fed16f6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/core/src/services/aws-saml-assertion-extraction-service.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ describe("AwsSamlAssertionExtractionService", () => {
3838
expect(service.isAuthenticationUrl(CloudProviderType.aws, "https://XX/realms/XX/protocol/saml/clients/XX")).toBe(true);
3939

4040
expect(service.isAuthenticationUrl(CloudProviderType.aws, "https://console.jumpcloud.com/login.mocked-suffix")).toBe(true);
41+
42+
/* Tests for GitHub OAuth Identity Providers */
43+
expect(service.isAuthenticationUrl(CloudProviderType.aws, "https://github.com/login/oauth/authorize")).toBe(true);
44+
expect(service.isAuthenticationUrl(CloudProviderType.aws, "https://github.XX/login/oauth/authorize")).toBe(true);
45+
expect(service.isAuthenticationUrl(CloudProviderType.aws, "https://github.com/login")).toBe(false);
46+
expect(service.isAuthenticationUrl(CloudProviderType.aws, "https://github.com")).toBe(false);
4147
});
4248

4349
test("isSamlAssertionUrl", () => {

0 commit comments

Comments
 (0)