Skip to content

Commit ddc5e08

Browse files
committed
Separated config testing.
1 parent b87e8e9 commit ddc5e08

File tree

1 file changed

+0
-99
lines changed

1 file changed

+0
-99
lines changed

tests/test_server_00_configure.py

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -155,102 +155,3 @@ def test_loggin_conf_default():
155155
def test_loggin_conf_dict():
156156
logger = configure_logging(config=CONF)
157157
assert logger
158-
159-
160-
extra = {
161-
"token_usage_rules": {
162-
"authorization_code": {
163-
"expires_in": 600,
164-
"supports_minting": ["access_token", "refresh_token"],
165-
},
166-
"refresh_token": {"supports_minting": ["access_token"]},
167-
},
168-
"pkce_essential": True,
169-
"auth_method": {
170-
"AccessTokenRequest": "client_secret_basic",
171-
},
172-
"dpop_jkt": "thumbprint",
173-
"revoke_refresh_on_issue": True,
174-
"token_exchange": {
175-
"urn:ietf:params:oauth:grant-type:token-exchange": {
176-
"class": "idpyoidc.server.oidc.token.TokenExchangeHelper",
177-
"kwargs": {
178-
"subject_token_types_supported": [
179-
"urn:ietf:params:oauth:token-type:access_token",
180-
"urn:ietf:params:oauth:token-type:refresh_token",
181-
"urn:ietf:params:oauth:token-type:id_token"
182-
],
183-
"requested_token_types_supported": [
184-
"urn:ietf:params:oauth:token-type:access_token",
185-
"urn:ietf:params:oauth:token-type:refresh_token",
186-
"urn:ietf:params:oauth:token-type:id_token"
187-
],
188-
"policy": {
189-
"urn:ietf:params:oauth:token-type:access_token": {
190-
"callable": "/path/to/callable",
191-
"kwargs": {
192-
"audience": ["https://example.com"],
193-
"scopes": ["openid"]
194-
}
195-
},
196-
"urn:ietf:params:oauth:token-type:refresh_token": {
197-
"callable": "/path/to/callable",
198-
"kwargs": {
199-
"resource": ["https://example.com"],
200-
"scopes": ["openid"]
201-
}
202-
},
203-
"": {
204-
"callable": "/path/to/callable",
205-
"kwargs": {
206-
"scopes": ["openid"]
207-
}
208-
}
209-
}
210-
}
211-
},
212-
# "backchannel_logout_uri": None,
213-
# frontchannel_logout_uri: None,
214-
"allowed_scopes": ["scope"],
215-
"scopes_to_claims": {
216-
"scope_a": ["claim1", "claim2"],
217-
"scope_b": []
218-
},
219-
"add_claims": {
220-
"always": {
221-
"userinfo": ["email", "phone"], # Always add "email" and "phone" in the userinfo response if such claims exists
222-
"id_token": {"email": None}, # Always add "email" in the id_token if such a claim exists
223-
"introspection": {"email": {"value": "a@a.com"}}, # Add "email" in the introspection response only if its value is "a@a.com"
224-
},
225-
"by_scope": {
226-
"id_token": False,
227-
},
228-
}
229-
}
230-
}
231-
232-
def test_op_configure_oidc_clients():
233-
_str = open(full_path("op_config.json")).read()
234-
_conf = json.loads(_str)
235-
_conf["oidc_clients"] = {
236-
"client1": {
237-
# client secret is "password"
238-
"client_secret": "Namnam",
239-
"redirect_uris": ['https://openidconnect.net/callback', ''],
240-
"response_types": ["code"]
241-
},
242-
"client2": {
243-
"client_secret": "spraket",
244-
"redirect_uris": ['https://app1.example.net/foo', 'https://app2.example.net/bar'],
245-
"response_types": ["code"]
246-
},
247-
"client3": {
248-
"client_secret": '2222222222222222222222222222222222222222',
249-
"redirect_uris": ['https://127.0.0.1:8090/authz_cb/bobcat'],
250-
"post_logout_redirect_uri": 'https://openidconnect.net/',
251-
"response_types": ["code"]
252-
}
253-
}
254-
255-
op_conf = OPConfiguration(conf=_conf)
256-
assert op_conf

0 commit comments

Comments
 (0)