Skip to content

Commit

Permalink
Merge pull request #161 from jihyungSong/master
Browse files Browse the repository at this point in the history
Add token for SpaceConnector
  • Loading branch information
jihyungSong authored Aug 1, 2023
2 parents 97a8e10 + aece908 commit 7229e04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/spaceone/inventory/manager/identity_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from spaceone.core import cache
from spaceone.core import cache, config
from spaceone.core.manager import BaseManager
from spaceone.core.connector.space_connector import SpaceConnector

Expand All @@ -14,7 +14,9 @@ def __init__(self, *args, **kwargs):
self.identity_conn: SpaceConnector = self.locator.get_connector('SpaceConnector', service='identity',
token=token)
else:
self.identity_conn: SpaceConnector = self.locator.get_connector('SpaceConnector', service='identity')
system_token = config.get_global('TOKEN')
self.identity_conn: SpaceConnector = self.locator.get_connector('SpaceConnector', service='identity',
token=system_token)

def get_user(self, user_id, domain_id):
return self.identity_conn.dispatch('User.get', {'user_id': user_id, 'domain_id': domain_id})
Expand Down

0 comments on commit 7229e04

Please sign in to comment.