-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add permissions to Auth provider values, add a few more deps in…
… Toolbox effect's deps array (#111) ## Description <!-- Write and explain of the changes introduced by this PR for the reviewers to fully understand --> ## Screenshot <!-- Provide a screenshot or gif of the change to demonstrate it --> ## Test Plan <!-- Explain what you tested and why --> <!-- Have any questions? Check out the contributing doc for more -->
- Loading branch information
Showing
11 changed files
with
92 additions
and
36 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,17 @@ | ||
--- | ||
id: 'GetAccessTokenSilently' | ||
title: 'GetAccessTokenSilently' | ||
sidebar_label: 'GetAccessTokenSilently' | ||
sidebar_position: 1 | ||
--- | ||
import Type from '../_type-definitions/GetAccessTokenSilently.md'; | ||
|
||
|
||
```ts | ||
import { type GetAccessTokenSilently } from '@orfium/toolbox'; | ||
``` | ||
|
||
### Definition | ||
|
||
<Type /> | ||
|
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,17 @@ | ||
--- | ||
id: 'Permissions' | ||
title: 'Permissions' | ||
sidebar_label: 'Permissions' | ||
sidebar_position: 1 | ||
--- | ||
import Type from '../_type-definitions/Permissions.md'; | ||
|
||
|
||
```ts | ||
import { type Permissions } from '@orfium/toolbox'; | ||
``` | ||
|
||
### Definition | ||
|
||
<Type /> | ||
|
23 changes: 11 additions & 12 deletions
23
documentation/docs/api/_type-definitions/DecodedTokenResponse.md
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
| Name | Type | | ||
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `iss?` | `string` | | ||
| `sub?` | `string` | | ||
| `aud?` | `string[]` | | ||
| `iat?` | `number` | | ||
| `exp?` | `number` | | ||
| `azp?` | `string` | | ||
| `scope?` | `string` | | ||
| `org_id?` | `string` (_the organization id of the user currently selected_) | | ||
| `permissions?` | `string[]` (_the permissions defined on the user for more info visit https://orfium.atlassian.net/wiki/spaces/OPS/pages/2554134739/Roles+and+Permissions#Organization-Roles_) | | ||
|
||
| Name | Type | Info | | ||
| :------------- | :------------------------------------------- |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `iss?` | `string` | | | ||
| `sub?` | `string` | | | ||
| `aud?` | `string[]` | | | ||
| `iat?` | `number` | | | ||
| `exp?` | `number` | | | ||
| `azp?` | `string` | | | ||
| `scope?` | `string` | | | ||
| `org_id?` | `string` | The organization id of the user currently selected | | ||
| `permissions?` | [`Permissions`](/docs/api/Types/Permissions) | The permissions defined on the user. For more info visit [this page](https://orfium.atlassian.net/wiki/spaces/OPS/pages/2554134739/Roles+and+Permissions#Organization-Roles) | |
1 change: 1 addition & 0 deletions
1
documentation/docs/api/_type-definitions/GetAccessTokenSilently.md
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 @@ | ||
<pre>(opts?: GetTokenSilentlyOptions) => Promise\<<br/> void | <br/> \{ <br/> decodedToken: [DecodedTokenResponse](/docs/api/Types/DecodedTokenResponse) | Record\<string, never\>; <br/> token: string; <br/> \}<br/>\></pre> |
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 @@ | ||
`string[]` |
17 changes: 9 additions & 8 deletions
17
documentation/docs/api/_type-definitions/UseAuthenticationReturnValue.md
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
| Name | Type | | ||
| :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `isAuthenticated` | `boolean` | | ||
| `isLoading` | `boolean` | | ||
| `user` | <code>[User](/docs/api/Types/User) | undefined</code> | | ||
| `getAccessTokenSilently` | <pre>(opts?: GetTokenSilentlyOptions) => Promise\<<br/> void | <br/> \{ <br/> decodedToken: [DecodedTokenResponse](/docs/api/Types/DecodedTokenResponse) | Record\<string, never\>; <br/> token: string; <br/> \}<br/>\></pre> | | ||
| `loginWithRedirect` | <code>(o?: RedirectLoginOptions\<any\>) => Promise\<void\></code> | | ||
| `logout` | `() => void` | | ||
| Name | Type | | ||
| :----------------------- |:------------------------------------------------------------------| | ||
| `isAuthenticated` | `boolean` | | ||
| `isLoading` | `boolean` | | ||
| `permissions` | [`Permissions`](/docs/api/Types/Permissions) | | ||
| `user` | <code>[User](/docs/api/Types/User) | undefined</code> | | ||
| `getAccessTokenSilently` | [`GetAccessTokenSilently`](/docs/api/Types/GetAccessTokenSilently) | | ||
| `loginWithRedirect` | <code>(o?: RedirectLoginOptions\<any\>) => Promise\<void\></code> | | ||
| `logout` | `() => void` | |
2 changes: 1 addition & 1 deletion
2
documentation/docs/api/_type-definitions/UseOrfiumProductsReturnValue.md
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 |
---|---|---|
@@ -1 +1 @@ | ||
[`Product`](../Types/Product)`[] | null` | ||
<code>[Product](/docs/api/Types/Product)[] | null</code> |
10 changes: 5 additions & 5 deletions
10
documentation/docs/api/_type-definitions/UseOrganizationsReturnValue.md
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
| Name | Type | | ||
| :--------------------- | :--------------------------------------------------------------- | | ||
| `organizations` | <code>[Organization](../Types/Organization)[]</code> | | ||
| `selectedOrganization` | <code>[Organization](../Types/Organization)[] | null</code> | | ||
| `switchOrganization` | `(organisation: string) => void` | | ||
| Name | Type | | ||
| :--------------------- | :------------------------------------------------------------- | | ||
| `organizations` | <code>[Organization](../Types/Organization)[]</code> | | ||
| `selectedOrganization` | <code>[Organization](../Types/Organization) | null</code> | | ||
| `switchOrganization` | `(organisation: string) => void` | |
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 |
---|---|---|
@@ -1,2 +1,7 @@ | ||
export { type DecodedTokenResponse, type User } from './authentication'; | ||
export { | ||
type DecodedTokenResponse, | ||
type GetAccessTokenSilently, | ||
type Permissions, | ||
type User, | ||
} from './authentication'; | ||
export { type Product } from './orfium-products'; |
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