Class: Disclosure
identity_wasm.Disclosure
Represents an elements constructing a disclosure. Object properties and array elements disclosures are supported.
See: https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-07.html#name-disclosures
Table of contents
Constructors
Methods
Constructors
constructor
• new Disclosure(salt
, claim_name
, claim_value
)
Parameters
Name | Type |
---|---|
salt | string |
claim_name | undefined | string |
claim_value | any |
Methods
toJSON
▸ toJSON(): Object
- Return copy of self without private attributes.
Returns
Object
▸ toJSON(): any
Serializes this to a JSON object.
Returns
any
toString
▸ toString(): string
Return stringified version of self.
Returns
string
▸ toString(): string
Returns a copy of the base64url-encoded string.
Returns
string
parse
▸ Static
parse(disclosure
): Disclosure
Parses a Base64 encoded disclosure into a Disclosure
.
Error
Returns an InvalidDisclosure
if input is not a valid disclosure.
Parameters
Name | Type |
---|---|
disclosure | string |
Returns
disclosure
▸ disclosure(): string
Returns a copy of the base64url-encoded string.
Returns
string
toEncodedString
▸ toEncodedString(): string
Returns a copy of the base64url-encoded string.
Returns
string
salt
▸ salt(): string
Returns a copy of the salt value.
Returns
string
claimName
▸ claimName(): undefined
| string
Returns a copy of the claim name, optional for array elements.
Returns
undefined
| string
claimValue
▸ claimValue(): any
Returns a copy of the claim Value which can be of any type.
Returns
any
fromJSON
▸ Static
fromJSON(json
): Disclosure
Deserializes an instance from a JSON object.
Parameters
Name | Type |
---|---|
json | any |