Release Note for 4.2 - Initial draft. (#6390)

* Release Note for 4.2 - Initial draft.

* update dep

* documentation

* fix

* remove script

* lint

Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
Francesco Corti
2020-12-07 22:03:41 +01:00
committed by GitHub
parent 27167b3420
commit 5a4cc4edda
214 changed files with 5178 additions and 4950 deletions

View File

@@ -7,51 +7,51 @@ Last reviewed: 2019-01-09
# [JWT helper service](../../../lib/core/services/jwt-helper.service.ts "Defined in jwt-helper.service.ts")
Decodes a JSON Web Token (JWT) to a JavaScript object.
Decodes a JSON Web Token (JWT) to a JavaScript object.
## Class members
### Methods
- **decodeToken**(token: `any`): `Object`<br/>
* **decodeToken**(token: `any`): `Object`<br/>
Decodes a JSON web token into a JS object.
- _token:_ `any` - Token in encoded form
- **Returns** `Object` - Decoded token data object
- **getAccessToken**(): `string`<br/>
* *token:* `any` - Token in encoded form
* **Returns** `Object` - Decoded token data object
* **getAccessToken**(): `string`<br/>
Gets access token
- **Returns** `string` - access token
- **getClientRoles**(clientName: `string`): `string[]`<br/>
* **Returns** `string` - access token
* **getClientRoles**(clientName: `string`): `string[]`<br/>
Gets Client roles.
- _clientName:_ `string` -
- **Returns** `string[]` - Array of client roles
- **getRealmRoles**(): `string[]`<br/>
* *clientName:* `string` -
* **Returns** `string[]` - Array of client roles
* **getRealmRoles**(): `string[]`<br/>
Gets realm roles.
- **Returns** `string[]` - Array of realm roles
- **getValueFromLocalAccessToken**(key: `string`)<br/>
* **Returns** `string[]` - Array of realm roles
* **getValueFromLocalAccessToken**(key: `string`)<br/>
Gets a named value from the user access token.
- _key:_ `string` - Key name of the field to retrieve
- **getValueFromToken**(accessToken: `string`, key: `string`)<br/>
* *key:* `string` - Key name of the field to retrieve
* **getValueFromToken**(accessToken: `string`, key: `string`)<br/>
Gets a named value from the user access token.
- _accessToken:_ `string` - your SSO access token where the value is encode
- _key:_ `string` - Key name of the field to retrieve
- **hasClientRole**(clientName: `string`, role: `string`): `boolean`<br/>
* *accessToken:* `string` - your SSO access token where the value is encode
* *key:* `string` - Key name of the field to retrieve
* **hasClientRole**(clientName: `string`, role: `string`): `boolean`<br/>
Checks for client role.
- _clientName:_ `string` - Targeted client name
- _role:_ `string` - Role name to check
- **Returns** `boolean` - True if it contains given role, false otherwise
- **hasRealmRole**(role: `string`): `boolean`<br/>
* *clientName:* `string` - Targeted client name
* *role:* `string` - Role name to check
* **Returns** `boolean` - True if it contains given role, false otherwise
* **hasRealmRole**(role: `string`): `boolean`<br/>
Checks for single realm role.
- _role:_ `string` - Role name to check
- **Returns** `boolean` - True if it contains given role, false otherwise
- **hasRealmRoles**(rolesToCheck: `string[]`): `boolean`<br/>
* *role:* `string` - Role name to check
* **Returns** `boolean` - True if it contains given role, false otherwise
* **hasRealmRoles**(rolesToCheck: `string[]`): `boolean`<br/>
Checks for realm roles.
- _rolesToCheck:_ `string[]` - List of role names to check
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
- **hasRealmRolesForClientRole**(clientName: `string`, rolesToCheck: `string[]`): `boolean`<br/>
* *rolesToCheck:* `string[]` - List of role names to check
* **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
* **hasRealmRolesForClientRole**(clientName: `string`, rolesToCheck: `string[]`): `boolean`<br/>
Checks for client roles.
- _clientName:_ `string` - Targeted client name
- _rolesToCheck:_ `string[]` - List of role names to check
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
* *clientName:* `string` - Targeted client name
* *rolesToCheck:* `string[]` - List of role names to check
* **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
## Details
@@ -61,4 +61,4 @@ for full details of the standard and its uses.
## See also
- [Identity user service](identity-user.service.md)
* [Identity user service](identity-user.service.md)