-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a new global parameter to override the identity server uri. This makes it easier to use the UiPath services with an external identity token provider. It was possible before to override the identity server uri by setting the UIPATH_IDENTITY_URI environment variable but not by providing a global CLI parameter. Refactored the code so that the CLI parameter, config value and environment variable parsing is done in the command_builder like all the other parameters and removed the env variable parsing from the bearer authenticator.
- Loading branch information
Showing
14 changed files
with
123 additions
and
139 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
package auth | ||
|
||
import "net/url" | ||
|
||
// AuthenticatorContext provides information required for authenticating requests. | ||
type AuthenticatorContext struct { | ||
Type string `json:"type"` | ||
Config map[string]interface{} `json:"config"` | ||
Debug bool `json:"debug"` | ||
Insecure bool `json:"insecure"` | ||
Request AuthenticatorRequest `json:"request"` | ||
Type string `json:"type"` | ||
Config map[string]interface{} `json:"config"` | ||
IdentityUri url.URL `json:"identityUri"` | ||
Debug bool `json:"debug"` | ||
Insecure bool `json:"insecure"` | ||
Request AuthenticatorRequest `json:"request"` | ||
} | ||
|
||
func NewAuthenticatorContext( | ||
authType string, | ||
config map[string]interface{}, | ||
identityUri url.URL, | ||
debug bool, | ||
insecure bool, | ||
request AuthenticatorRequest) *AuthenticatorContext { | ||
return &AuthenticatorContext{authType, config, debug, insecure, request} | ||
return &AuthenticatorContext{authType, config, identityUri, debug, insecure, request} | ||
} |
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
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
Oops, something went wrong.