Merged
Conversation
cb549c8 to
e1e510c
Compare
lindenmckenzie
requested changes
Feb 3, 2026
Contributor
lindenmckenzie
left a comment
There was a problem hiding this comment.
Some minor bits - I will think about the passing of the auth token.
api/jobs.go
Outdated
| ctx := r.Context() | ||
|
|
||
| userAuthToken, err := api.GetUserAuthToken(r) | ||
|
|
Contributor
There was a problem hiding this comment.
No whitespace after error catch.
api/jobs.go
Outdated
Comment on lines
+130
to
+132
| log.Info(ctx, "no authorization header in request", log.Data{ | ||
| "error": err.Error(), | ||
| }) |
Contributor
There was a problem hiding this comment.
don't think you actually need to log the error here - it's a legitimate request and being dealt with successfully.
api/jobs.go
Outdated
| bearerToken := r.Header.Get(dprequest.AuthHeaderKey) | ||
| if bearerToken == "" { | ||
| return "", errors.New("authorization header missing") | ||
| // Get JTW token |
Contributor
There was a problem hiding this comment.
Suggested change
| // Get JTW token | |
| // Get JWT token |
api/jobs.go
Outdated
Comment on lines
+316
to
+325
| // GetUserAuthToken gets the user auth token from the Authorization header | ||
| func (api *MigrationAPI) GetUserAuthToken(r *http.Request) (string, error) { | ||
| authToken := r.Header.Get(dprequest.AuthHeaderKey) | ||
| if authToken == "" { | ||
| return "", errors.New("authorisation failed: no authorisation header in request") | ||
| } | ||
| authToken = strings.TrimPrefix(authToken, dprequest.BearerPrefix) | ||
|
|
||
| return authToken, nil | ||
| } |
Contributor
There was a problem hiding this comment.
Not sure this needs to be part of the MigrationAPI struct.
I'm surprised it's not part of dp-net.
.dis-vulncheck.yaml
Outdated
| @@ -1,2 +1,2 @@ | |||
| --- | |||
| toolchain: go1.24.11 | |||
| toolchain: go1.24.12 | |||
Contributor
There was a problem hiding this comment.
Now we have a build file we don't need this file any more.
26fa123 to
3131aa6
Compare
3131aa6 to
c3167a3
Compare
lindenmckenzie
approved these changes
Feb 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
User auth token now being passed to validate external
ONSdigital/dp-api-clients-go#455 <- user auth token passed here
Upgrade go to 1.24.12
How to review
Sense check
Confirm everything is okay/in place
Who can review
not me