Skip to content

Commit

Permalink
Bump Version + B2B TOTP MFA cont. (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie-stytch authored Jan 2, 2024
1 parent c2a1807 commit 7c4b145
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/b2b/sessions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions lib/b2b/discovery_organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,24 @@ export interface B2BDiscoveryOrganizationsCreateRequest {
* for more information about role assignment.
*/
rbac_email_implicit_role_assignments?: EmailImplicitRoleAssignment[];
/**
* The setting that controls which mfa methods can be used by Members of an Organization. The accepted
* values are:
*
* `ALL_ALLOWED` – the default setting which allows all authentication methods to be used.
*
* `RESTRICTED` – only methods that comply with `allowed_auth_methods` can be used for authentication.
* This setting does not apply to Members with `is_breakglass` set to `true`.
*
*/
mfa_methods?: string;
/**
* An array of allowed mfa authentication methods. This list is enforced when `mfa_methods` is set to
* `RESTRICTED`.
* The list's accepted values are: `sms_otp` and `totp`.
*
*/
allowed_mfa_methods?: string[];
}

// Response type for `discovery.organizations.create`.
Expand Down
40 changes: 40 additions & 0 deletions lib/b2b/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,23 @@ export interface B2BOrganizationsCreateRequest {
* for more information about role assignment.
*/
rbac_email_implicit_role_assignments?: EmailImplicitRoleAssignment[];
/**
* The setting that controls which mfa methods can be used by Members of an Organization. The accepted
* values are:
*
* `ALL_ALLOWED` – the default setting which allows all authentication methods to be used.
*
* `RESTRICTED` – only methods that comply with `allowed_auth_methods` can be used for authentication.
* This setting does not apply to Members with `is_breakglass` set to `true`.
*
*/
mfa_methods?: string;
/**
* An array of allowed mfa authentication methods. This list is enforced when `mfa_methods` is set to
* `RESTRICTED`.
* The list's accepted values are: `sms_otp` and `totp`.
*
*/
allowed_mfa_methods?: string[];
}

Expand Down Expand Up @@ -786,7 +802,31 @@ export interface B2BOrganizationsUpdateRequest {
* permission to perform the `update.settings.implicit-roles` action on the `stytch.organization` Resource.
*/
rbac_email_implicit_role_assignments?: string[];
/**
* The setting that controls which mfa methods can be used by Members of an Organization. The accepted
* values are:
*
* `ALL_ALLOWED` – the default setting which allows all authentication methods to be used.
*
* `RESTRICTED` – only methods that comply with `allowed_auth_methods` can be used for authentication.
* This setting does not apply to Members with `is_breakglass` set to `true`.
*
*
* If this field is provided and a session header is passed into the request, the Member Session must have
* permission to perform the `update.settings.allowed-auth-methods` action on the `stytch.organization`
* Resource.
*/
mfa_methods?: string;
/**
* An array of allowed mfa authentication methods. This list is enforced when `mfa_methods` is set to
* `RESTRICTED`.
* The list's accepted values are: `sms_otp` and `totp`.
*
*
* If this field is provided and a session header is passed into the request, the Member Session must have
* permission to perform the `update.settings.allowed-mfa-methods` action on the `stytch.organization`
* Resource.
*/
allowed_mfa_methods?: string[];
}

Expand Down
4 changes: 2 additions & 2 deletions lib/b2b/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export interface B2BSessionsAuthenticateRequest {
* authorized to perform the given action on the given Resource in the specified Organization. A Member
* is authorized if
* their Member Session contains a Role, assigned
* [explicitly or implicitly](https://github.com/docs/b2b/guides/rbac/role-assignment), with adequate
* [explicitly or implicitly](https://stytch.com/docs/b2b/guides/rbac/role-assignment), with adequate
* permissions.
* In addition, the `organization_id` passed in the authorization check must match the Member's
* Organization.
Expand Down Expand Up @@ -456,7 +456,7 @@ export class Sessions {
* If an `authorization_check` object is passed in, this method will also check if the Member is authorized
* to perform the given action on the given Resource in the specified Organization. A Member is authorized
* if their Member Session contains a Role, assigned
* [explicitly or implicitly](https://github.com/docs/b2b/guides/rbac/role-assignment), with adequate
* [explicitly or implicitly](https://stytch.com/docs/b2b/guides/rbac/role-assignment), with adequate
* permissions.
* In addition, the `organization_id` passed in the authorization check must match the Member's
* Organization.
Expand Down
2 changes: 1 addition & 1 deletion lib/b2c/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export interface OAuthAuthenticateResponse {
* provider's API for a given user.
*
* Note that these values will vary based on the OAuth provider in question, e.g. `id_token` is only
* returned by OIDC complaint identity providers.
* returned by OIDC compliant identity providers.
*/
provider_values: OAuthProviderValues;
/**
Expand Down
18 changes: 18 additions & 0 deletions types/lib/b2b/discovery_organizations.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions types/lib/b2b/organizations.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions types/lib/b2b/sessions.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/lib/b2c/oauth.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7c4b145

Please sign in to comment.