Skip to content

Commit

Permalink
Add domain_verification intent (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulAsjes authored Oct 21, 2024
1 parent 25eb04e commit be86c87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
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

0 comments on commit be86c87

Please sign in to comment.