forked from louketo/louketo-proxy
-
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.
* abide by modern go linting standards (golangci) * include `.golangci.yml` config to (optionally) carry out automated linting check on PRs * does not change behavior NOTE: upgrading deprecated prometheus middleware is not carried out in this PR Signed-off-by: Frederic BIDON <[email protected]>
- Loading branch information
Showing
23 changed files
with
172 additions
and
130 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 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
golint: | ||
min-confidence: 0 | ||
gocyclo: | ||
min-complexity: 60 | ||
maligned: | ||
suggest-new: true | ||
dupl: | ||
threshold: 100 | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 2 | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- maligned | ||
- unparam | ||
- lll | ||
- gochecknoinits | ||
- gochecknoglobals |
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
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 |
---|---|---|
|
@@ -33,17 +33,17 @@ var ( | |
version = "" | ||
) | ||
|
||
type contextKey int8 | ||
|
||
const ( | ||
prog = "keycloak-gatekeeper" | ||
author = "Keycloak" | ||
email = "[email protected]" | ||
description = "is a proxy using the keycloak service for auth and authorization" | ||
|
||
authorizationHeader = "Authorization" | ||
contextScopeName = "context.scope.name" | ||
envPrefix = "PROXY_" | ||
headerUpgrade = "Upgrade" | ||
httpSchema = "http" | ||
versionHeader = "X-Auth-Proxy-Version" | ||
|
||
authorizationURL = "/authorize" | ||
|
@@ -62,6 +62,17 @@ const ( | |
claimResourceAccess = "resource_access" | ||
claimResourceRoles = "roles" | ||
claimGroups = "groups" | ||
|
||
accessCookie = "kc-access" | ||
refreshCookie = "kc-state" | ||
requestURICookie = "request_uri" | ||
requestStateCookie = "OAuth_Token_Request_State" | ||
unsecureScheme = "http" | ||
secureScheme = "https" | ||
anyMethod = "ANY" | ||
|
||
_ contextKey = iota | ||
contextScopeName | ||
) | ||
|
||
const ( | ||
|
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 |
---|---|---|
|
@@ -21,5 +21,5 @@ import ( | |
|
||
func main() { | ||
app := newOauthProxyApp() | ||
app.Run(os.Args) | ||
_ = app.Run(os.Args) | ||
} |
Oops, something went wrong.