Skip to content

Commit

Permalink
fix(typescript): allow any string into "alg" and "enc" client fields
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Mar 16, 2022
1 parent 29a5354 commit e6a8649
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions docs/interfaces/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ Recognized Client Metadata that have an effect on the exposed functionality.
- [request\_object\_encryption\_enc](Client.md#request_object_encryption_enc)
- [require\_auth\_time](Client.md#require_auth_time)
- [token\_endpoint\_auth\_method](Client.md#token_endpoint_auth_method)
- [token\_endpoint\_auth\_signing\_alg](Client.md#token_endpoint_auth_signing_alg)
- [userinfo\_signed\_response\_alg](Client.md#userinfo_signed_response_alg)

## Properties

### authorization\_signed\_response\_alg

`Optional` **authorization\_signed\_response\_alg**: [`JWSAlgorithm`](../types/JWSAlgorithm.md)
`Optional` **authorization\_signed\_response\_alg**: `string`

JWS "alg" algorithm required for signing authorization responses.

Expand Down Expand Up @@ -59,7 +60,7 @@ ___

### id\_token\_signed\_response\_alg

`Optional` **id\_token\_signed\_response\_alg**: [`JWSAlgorithm`](../types/JWSAlgorithm.md)
`Optional` **id\_token\_signed\_response\_alg**: `string`

JWS "alg" algorithm required for signing the ID Token issued to this
Client.
Expand All @@ -68,15 +69,15 @@ ___

### introspection\_signed\_response\_alg

`Optional` **introspection\_signed\_response\_alg**: [`JWSAlgorithm`](../types/JWSAlgorithm.md)
`Optional` **introspection\_signed\_response\_alg**: `string`

JWS "alg" algorithm REQUIRED for signed introspection responses.

___

### request\_object\_encryption\_enc

`Optional` **request\_object\_encryption\_enc**: [`ContentEncryptionAlgorithm`](../types/ContentEncryptionAlgorithm.md)
`Optional` **request\_object\_encryption\_enc**: `string`

JWE "enc" algorithm the RP is declaring that it may use for encrypting
Request Objects sent to the authorization server.
Expand All @@ -94,7 +95,7 @@ ___

### token\_endpoint\_auth\_method

`Optional` **token\_endpoint\_auth\_method**: [`TokenEndpointAuthMethod`](../types/TokenEndpointAuthMethod.md)
`Optional` **token\_endpoint\_auth\_method**: `string`

Client [authentication method](../types/TokenEndpointAuthMethod.md) for the
client's authenticated requests.
Expand All @@ -103,6 +104,6 @@ ___

### userinfo\_signed\_response\_alg

`Optional` **userinfo\_signed\_response\_alg**: [`JWSAlgorithm`](../types/JWSAlgorithm.md)
`Optional` **userinfo\_signed\_response\_alg**: `string`

JWS "alg" algorithm REQUIRED for signing UserInfo Responses.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,21 +514,21 @@ export interface Client {
* Client {@link TokenEndpointAuthMethod authentication method} for the
* client's authenticated requests.
*/
token_endpoint_auth_method?: TokenEndpointAuthMethod
token_endpoint_auth_method?: TokenEndpointAuthMethod | string
/**
* JWS "alg" algorithm required for signing the ID Token issued to this
* Client.
*/
id_token_signed_response_alg?: JWSAlgorithm
id_token_signed_response_alg?: JWSAlgorithm | string
/**
* JWS "alg" algorithm required for signing authorization responses.
*/
authorization_signed_response_alg?: JWSAlgorithm
authorization_signed_response_alg?: JWSAlgorithm | string
/**
* JWE "enc" algorithm the RP is declaring that it may use for encrypting
* Request Objects sent to the authorization server.
*/
request_object_encryption_enc?: ContentEncryptionAlgorithm
request_object_encryption_enc?: ContentEncryptionAlgorithm | string
/**
* Boolean value specifying whether the {@link IDToken.auth_time auth_time}
* Claim in the ID Token is REQUIRED.
Expand All @@ -537,11 +537,11 @@ export interface Client {
/**
* JWS "alg" algorithm REQUIRED for signing UserInfo Responses.
*/
userinfo_signed_response_alg?: JWSAlgorithm
userinfo_signed_response_alg?: JWSAlgorithm | string
/**
* JWS "alg" algorithm REQUIRED for signed introspection responses.
*/
introspection_signed_response_alg?: JWSAlgorithm
introspection_signed_response_alg?: JWSAlgorithm | string
/**
* Default Maximum Authentication Age.
*/
Expand Down

0 comments on commit e6a8649

Please sign in to comment.