( clientSecret: string | null | undefined, method: ClientAuthMethod, )
| 916 | // ones, so an absent secret here unambiguously means "public client". The |
| 917 | // `method` only chooses HOW a present secret is sent (post vs basic). |
| 918 | const pickClientAuth = ( |
| 919 | clientSecret: string | null | undefined, |
| 920 | method: ClientAuthMethod, |
| 921 | ): oauth.ClientAuth => { |
| 922 | if (!clientSecret) return oauth.None(); |
| 923 | return method === "basic" |
| 924 | ? oauth.ClientSecretBasic(clientSecret) |
| 925 | : oauth.ClientSecretPost(clientSecret); |
| 926 | }; |
| 927 | |
| 928 | const normalizedTokenScope = ( |
| 929 | as: oauth.AuthorizationServer, |
no outgoing calls
no test coverage detected