Skip to content

Example private data from backend#44

Merged
davidcheung merged 2 commits intomainfrom
example-private-data-from-backend
Nov 25, 2020
Merged

Example private data from backend#44
davidcheung merged 2 commits intomainfrom
example-private-data-from-backend

Conversation

@davidcheung
Copy link
Copy Markdown
Contributor

@davidcheung davidcheung commented Nov 17, 2020

should be equivalent to commitdev/zero-backend-node#10 but for the go-backend

@davidcheung davidcheung force-pushed the example-private-data-from-backend branch 2 times, most recently from 9df3378 to 3f85c9b Compare November 24, 2020 21:12
@davidcheung davidcheung marked this pull request as ready for review November 24, 2020 21:15
@davidcheung davidcheung force-pushed the example-private-data-from-backend branch from 3f85c9b to 6b98f47 Compare November 24, 2020 21:17
@davidcheung davidcheung requested a review from bmonkman November 24, 2020 21:19
@@ -0,0 +1,37 @@
package auth
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind moving this from the root into internal?

"net/http"
)

func getUserInfoFromHeaders(r *http.Request) (error, string, string) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about returning a user info struct rather than strings?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is just private. Maybe think about how to expose this so other routes can check it too?

@davidcheung davidcheung merged commit bbc106d into main Nov 25, 2020
@davidcheung davidcheung deleted the example-private-data-from-backend branch November 25, 2020 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants