* Add Go macaroon library Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com> * Add macaroon generation and serialization, for login token. Signed-off-by: Anant Prakash <anantprakashjsr@gmail.com> * Remove copyright, trim empty lines * Make Serialize functions private * Fix typos
15 lines
347 B
Go
15 lines
347 B
Go
package macaroon
|
|
|
|
var (
|
|
AddThirdPartyCaveatWithRand = (*Macaroon).addThirdPartyCaveatWithRand
|
|
)
|
|
|
|
type MacaroonJSONV2 macaroonJSONV2
|
|
|
|
// SetVersion sets the version field of m to v;
|
|
// usually so that we can compare it for deep equality with
|
|
// another differently unmarshaled macaroon.
|
|
func (m *Macaroon) SetVersion(v Version) {
|
|
m.version = v
|
|
}
|