Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
680b1733
Unverified
Commit
680b1733
authored
Nov 30, 2024
by
Antoine Kaufmann
Browse files
symphony/client: use settings for auth & client url
parent
4fdee25b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
symphony/client/simbricks/client/auth.py
symphony/client/simbricks/client/auth.py
+4
-3
symphony/client/simbricks/client/client.py
symphony/client/simbricks/client/client.py
+2
-1
No files found.
symphony/client/simbricks/client/auth.py
View file @
680b1733
...
...
@@ -24,6 +24,7 @@ import json
import
aiohttp
import
time
import
os
from
.settings
import
client_settings
class
Token
:
...
...
@@ -56,9 +57,9 @@ class TokenClient:
def
__init__
(
self
,
device_auth_url
:
str
=
"https://auth.simbricks.io/realms/SimBricks/protocol/openid-connect/
auth
/
dev
ice"
,
token_url
:
str
=
"https://auth.simbricks.io/realms/SimBricks/protocol/openid-connect/
token
"
,
client_id
:
str
=
"api.auth.simbricks.io"
,
device_auth_url
:
str
=
client_settings
().
auth
_
dev
_url
,
token_url
:
str
=
client_settings
().
auth_
token
_url
,
client_id
:
str
=
client_settings
().
auth_client_id
,
):
self
.
_device_auth_url
:
str
=
device_auth_url
self
.
_token_url
:
str
=
token_url
...
...
symphony/client/simbricks/client/client.py
View file @
680b1733
...
...
@@ -25,13 +25,14 @@ import aiohttp
import
typing
import
contextlib
from
.auth
import
TokenProvider
from
.settings
import
client_settings
from
simbricks.orchestration
import
system
from
simbricks.orchestration
import
simulation
from
simbricks.orchestration
import
instantiation
class
BaseClient
:
def
__init__
(
self
,
base_url
=
"https://app.simbricks.io/api"
):
def
__init__
(
self
,
base_url
=
client_settings
().
base_url
):
self
.
_base_url
=
base_url
self
.
_token_provider
=
TokenProvider
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment