Beispiel #1
0
// Base64 implements the jose.Encoder interface.
func (c Claims) Base64() ([]byte, error) {
	b, err := c.MarshalJSON()
	if err != nil {
		return nil, err
	}
	return jose.Base64Encode(b), nil
}
Beispiel #2
0
// Base64 implements jose.Encoder.
func (p *payload) Base64() ([]byte, error) {
	b, err := json.Marshal(p.v)
	if err != nil {
		return nil, err
	}
	return jose.Base64Encode(b), nil
}
Beispiel #3
0
// Base64 helps implements jose.Encoder for Signature.
func (s Signature) Base64() ([]byte, error) {
	return jose.Base64Encode(s), nil
}