-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): Expose user saml_accounts property (#3405)
We fix an omission on our end where we didn't expose the 'saml_accounts' user property and therefore customers were not able to use it via our SDK
- Loading branch information
1 parent
456b068
commit 6888594
Showing
5 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/backend': minor | ||
--- | ||
|
||
Consume and expose the 'saml_accounts' property of the user resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { SamlAccountJSON } from './JSON'; | ||
import { Verification } from './Verification'; | ||
|
||
export class SamlAccount { | ||
constructor( | ||
readonly id: string, | ||
readonly provider: string, | ||
readonly providerUserId: string | null, | ||
readonly active: boolean, | ||
readonly emailAddress: string, | ||
readonly firstName: string, | ||
readonly lastName: string, | ||
readonly verification: Verification | null, | ||
) {} | ||
|
||
static fromJSON(data: SamlAccountJSON): SamlAccount { | ||
return new SamlAccount( | ||
data.id, | ||
data.provider, | ||
data.provider_user_id, | ||
data.active, | ||
data.email_address, | ||
data.first_name, | ||
data.last_name, | ||
data.verification && Verification.fromJSON(data.verification), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters