Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add domain_verification intent #372

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pkg/portal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ type GenerateLinkIntent string

// Constants that enumerate the available GenerateLinkIntent types.
const (
SSO GenerateLinkIntent = "sso"
DSync GenerateLinkIntent = "dsync"
AuditLogs GenerateLinkIntent = "audit_logs"
LogStreams GenerateLinkIntent = "log_streams"
SSO GenerateLinkIntent = "sso"
DSync GenerateLinkIntent = "dsync"
AuditLogs GenerateLinkIntent = "audit_logs"
LogStreams GenerateLinkIntent = "log_streams"
CertificateRenewal GenerateLinkIntent = "certificate_renewal"
DomainVerification GenerateLinkIntent = "domain_verification"
)

// GenerateLinkOpts contains the options to request Organizations.
Expand Down
12 changes: 12 additions & 0 deletions pkg/portal/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ func TestGenerateLink(t *testing.T) {
},
expected: "https://id.workos.test/portal/launch?secret=1234",
},
{
scenario: "Request returns link with domain_verification intent",
client: &Client{
APIKey: "test",
},
options: GenerateLinkOpts{
Intent: DomainVerification,
Organization: "organization_id",
ReturnURL: "https://foo-corp.app.com/settings",
},
expected: "https://id.workos.test/portal/launch?secret=1234",
},
}

for _, test := range tests {
Expand Down
Loading