1
+ import { mockOrigin } from "./const.ts" ;
2
+
1
3
export const mockIssuerMetadata = ( opPort : number ) => ( {
2
- issuer : `http://localhost :${ opPort } ` ,
3
- authorization_endpoint : `http://localhost :${ opPort } /oauth2/authorize` ,
4
- token_endpoint : `http://localhost :${ opPort } /oauth2/token` ,
5
- userinfo_endpoint : `http://localhost :${ opPort } /oauth2/userinfo` ,
6
- registration_endpoint : `http://localhost :${ opPort } /oauth2/clients` ,
7
- jwks_uri : `http://localhost :${ opPort } /oauth2/keys` ,
4
+ issuer : `${ mockOrigin } :${ opPort } ` ,
5
+ authorization_endpoint : `${ mockOrigin } :${ opPort } /oauth2/authorize` ,
6
+ token_endpoint : `${ mockOrigin } :${ opPort } /oauth2/token` ,
7
+ userinfo_endpoint : `${ mockOrigin } :${ opPort } /oauth2/userinfo` ,
8
+ registration_endpoint : `${ mockOrigin } :${ opPort } /oauth2/clients` ,
9
+ jwks_uri : `${ mockOrigin } :${ opPort } /oauth2/keys` ,
8
10
response_types_supported : [ "code" ] ,
9
11
response_modes_supported : [ "query" ] ,
10
12
grant_types_supported : [ "authorization_code" , "refresh_token" ] ,
@@ -60,23 +62,23 @@ export const mockIssuerMetadata = (opPort: number) => ({
60
62
"c_hash" ,
61
63
] ,
62
64
code_challenge_methods_supported : [ "S256" ] ,
63
- introspection_endpoint : `http://localhost :${ opPort } /oauth2/introspect` ,
65
+ introspection_endpoint : `${ mockOrigin } :${ opPort } /oauth2/introspect` ,
64
66
introspection_endpoint_auth_methods_supported : [
65
67
"client_secret_basic" ,
66
68
"client_secret_post" ,
67
69
"client_secret_jwt" ,
68
70
"private_key_jwt" ,
69
71
"none" ,
70
72
] ,
71
- revocation_endpoint : `http://localhost :${ opPort } /oauth2/revoke` ,
73
+ revocation_endpoint : `${ mockOrigin } :${ opPort } /oauth2/revoke` ,
72
74
revocation_endpoint_auth_methods_supported : [
73
75
"client_secret_basic" ,
74
76
"client_secret_post" ,
75
77
"client_secret_jwt" ,
76
78
"private_key_jwt" ,
77
79
"none" ,
78
80
] ,
79
- end_session_endpoint : `http://localhost :${ opPort } /oauth2/logout` ,
81
+ end_session_endpoint : `${ mockOrigin } :${ opPort } /oauth2/logout` ,
80
82
request_parameter_supported : true ,
81
83
request_object_signing_alg_values_supported : [
82
84
"HS256" ,
@@ -89,7 +91,7 @@ export const mockIssuerMetadata = (opPort: number) => ({
89
91
"ES384" ,
90
92
"ES512" ,
91
93
] ,
92
- device_authorization_endpoint : `http://localhost :${ opPort } /oauth2/device/authorize` ,
94
+ device_authorization_endpoint : `${ mockOrigin } :${ opPort } /oauth2/device/authorize` ,
93
95
dpop_signing_alg_values_supported : [
94
96
"RS256" ,
95
97
"RS384" ,
0 commit comments