-
Notifications
You must be signed in to change notification settings - Fork 10
feat: use validate-token endpoint in MustServer #449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
02fed7f
feat: use validate-token endpoint in MustServer
plyr4 1ba4511
fix: better error and removed ok check
plyr4 ee4dc7d
fix: better error and removed ok check
plyr4 e811529
chore: bump types
plyr4 25c2395
feat: use refresh auth endpoint
plyr4 7b4c5cc
Merge branch 'main' into feat/worker-auth
plyr4 1495e44
chore: remove user middleware in favor of MustServer token validation
plyr4 9a765f1
Merge branch 'feat/worker-auth' of github.com:go-vela/worker into fea…
plyr4 c6fa06f
chore: remove worker.RefreshAuth in favor of separate branch
plyr4 686e8a7
chore: bump server
plyr4 9576d68
chore: bump sdk-go
plyr4 98ac9aa
chore: bump server
plyr4 fab0b73
wip: perm_test.go
plyr4 37e055b
feat: MustServer tests
plyr4 150efa5
chore: tweak comments and return code for invalid parsing
plyr4 6e2e2e5
chore: remove secret from middleware
plyr4 ee39c05
fix: remove c.Error
plyr4 2cb0af6
fix: remove exist check from MustGet
plyr4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| // Copyright (c) 2023 Target Brands, Inc. All rights reserved. | ||
| // | ||
| // Use of this source code is governed by the LICENSE file in this repository. | ||
|
|
||
| package middleware | ||
|
|
||
| import ( | ||
| "github.com/gin-gonic/gin" | ||
| ) | ||
|
|
||
| // ServerAddress is a middleware function that attaches the | ||
| // server address to the context of every http.Request. | ||
| func ServerAddress(addr string) gin.HandlerFunc { | ||
| return func(c *gin.Context) { | ||
| c.Set("server-address", addr) | ||
| c.Next() | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.