-
-
Notifications
You must be signed in to change notification settings - Fork 678
Add token generation using go macaroon #437
Add token generation using go macaroon #437
Conversation
Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com>
32e9ea7
to
bb5863e
Compare
Warning: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks pretty good to me! Just some minor spelling things but that's all.
const ( | ||
macaroonVersion = macaroon.V2 | ||
defaultDuration = 2 * 60 | ||
// UserPrefix is common prefix for every user_id caveat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is common prefix" -> "is a common prefix"
defaultDuration = 2 * 60 | ||
// UserPrefix is common prefix for every user_id caveat | ||
UserPrefix = "user_id = " | ||
// TimePrefix is common prefix for every expiry caveat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is common prefix" -> "is a common prefix"
} | ||
|
||
// serializeMacaroon takes a macaroon to be serialized. | ||
// returns it's base64 encoded string, URL safe, which can be sent via web, email, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"returns it's" -> "returns its"
Merging with dead code. |
This reverts commit afeab7b.
Only the second commit is of interest.
1st commit is just the result of
gb vendor fetch -tag v2.0.0 github.com/go-macaroon/macaroon
.This was earlier part of #429