Skip to content

Commit

Permalink
Merge e3fa76f into 2414303
Browse files Browse the repository at this point in the history
  • Loading branch information
frankcorneliusmartin committed Sep 14, 2022
2 parents 2414303 + e3fa76f commit a8fa2ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vantage6-server/vantage6/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def additional_claims_loader(identity):
return

claims = {
'type': type_,
'client_type': type_,
'roles': roles,
}

Expand Down
2 changes: 1 addition & 1 deletion vantage6-server/vantage6/server/resource/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def decorator(*args, **kwargs):
claims = get_jwt()

# check that identity has access to endpoint
g.type = claims["type"]
g.type = claims["client_type"]
# log.debug(f"Endpoint accessed as {g.type}")

if g.type not in types:
Expand Down
4 changes: 2 additions & 2 deletions vantage6-server/vantage6/server/resource/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def post(self):

token = create_access_token(node)
ret = {
'access_token': create_access_token(node),
'access_token': token,
'refresh_token': create_refresh_token(node),
'node_url': self.api.url_for(server.resource.node.Node,
id=node.id),
Expand Down Expand Up @@ -286,7 +286,7 @@ def post(self):
# container identity consists of its node_id,
# task_id, collaboration_id and image_id
container = {
"type": "container",
"client_type": "container",
"node_id": g.node.id,
"organization_id": g.node.organization_id,
"collaboration_id": g.node.collaboration_id,
Expand Down

0 comments on commit a8fa2ef

Please sign in to comment.