-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make auth providers extensible Auth providers are now tools references and can be added as such. Obot will proxy auth requests to the appropriate auth provider and automatically refresh tokens on the user's behalf. Since auth providers are now tools that are loaded after startup, specifying auth configuration via environment variables is no longer supported. Instead, a bootstrap token can be provided to authenticate the user so that they may set up their first auth provider. If the user has enabled authentication, but has not provided a bootstrap token, then one will be generated an printed for the user to use. This change also adds the ability to configure multiple auth providers and a user trying to log into the system can choose which provider they would like to use. Signed-off-by: Grant Linville <[email protected]> Signed-off-by: Donnie Adams <[email protected]> Co-authored-by: Donnie Adams <[email protected]>
- Loading branch information
1 parent
83961cc
commit a0c0635
Showing
71 changed files
with
2,315 additions
and
1,539 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package types | ||
|
||
type AuthProvider struct { | ||
Metadata | ||
AuthProviderManifest | ||
AuthProviderStatus | ||
} | ||
|
||
type AuthProviderManifest struct { | ||
Name string `json:"name"` | ||
Namespace string `json:"namespace"` | ||
ToolReference string `json:"toolReference"` | ||
} | ||
|
||
type AuthProviderStatus struct { | ||
Icon string `json:"icon,omitempty"` | ||
Configured bool `json:"configured"` | ||
RequiredConfigurationParameters []string `json:"requiredConfigurationParameters,omitempty"` | ||
MissingConfigurationParameters []string `json:"missingConfigurationParameters,omitempty"` | ||
OptionalConfigurationParameters []string `json:"optionalConfigurationParameters,omitempty"` | ||
} | ||
|
||
type AuthProviderList List[AuthProvider] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.