forked from cyverse-de/terrain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-1112: modified terrain so that it uses a command-line option rat…
…her than environment variables to enable fake authentication
- Loading branch information
Showing
5 changed files
with
95 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(ns terrain.clients.iplant-groups.subjects | ||
"Functions to perform subject lookups using the iplant-groups service. This namespace was originally created to | ||
avoid a cirucular dependency in terrain.auth.user-attributes when terrain.clients.iplant-groups was added as a | ||
dependency to that namespace." | ||
(:require [cemerick.url :as curl] | ||
[clj-http.client :as http] | ||
[terrain.util.config :as config])) | ||
|
||
(defn- lookup-subject-url | ||
[short-username] | ||
(str (curl/url (config/ipg-base) "subjects" short-username))) | ||
|
||
(defn lookup-subject | ||
"Uses iplant-groups's subject lookup by ID endpoint to retrieve user details." | ||
[user short-username] | ||
(:body (http/get (lookup-subject-url short-username) | ||
{:query-params {:user user} | ||
:as :json}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters