X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/5017989693137cabe7f00a00c51db35625f9b55f..47f421fa743e2b4b09d4f0fbfbead00545e327d4:/src/store/auth/auth-action-session.ts diff --git a/src/store/auth/auth-action-session.ts b/src/store/auth/auth-action-session.ts index d36d5a33..b32e2050 100644 --- a/src/store/auth/auth-action-session.ts +++ b/src/store/auth/auth-action-session.ts @@ -56,7 +56,7 @@ const getTokenUuid = async (baseUrl: string, token: string): Promise => return Promise.resolve(uuid); } - const resp = await Axios.get(`${baseUrl}/api_client_authorizations`, { + const resp = await Axios.get(`${baseUrl}api_client_authorizations`, { headers: { Authorization: `OAuth2 ${token}` }, @@ -99,7 +99,7 @@ const clusterLogin = async (clusterId: string, baseUrl: string, activeSession: S }; }; -const getActiveSession = (sessions: Session[]): Session | undefined => sessions.find(s => s.active); +export const getActiveSession = (sessions: Session[]): Session | undefined => sessions.find(s => s.active); export const validateCluster = async (remoteHost: string, clusterId: string, activeSession: Session): Promise<{ user: User; token: string, baseUrl: string }> => { const baseUrl = await getRemoteHostBaseUrl(remoteHost);