MCPcopy
hub / github.com/golang-jwt/jwt / EncodeSegment

Method EncodeSegment

token.go:100–102  ·  view source on GitHub ↗

EncodeSegment encodes a JWT specific base64url encoding with padding stripped. In the future, this function might take into account a [TokenOption]. Therefore, this function exists as a method of [Token], rather than a global function.

(seg []byte)

Source from the content-addressed store, hash-verified

98// [TokenOption]. Therefore, this function exists as a method of [Token], rather
99// than a global function.
100func (*Token) EncodeSegment(seg []byte) string {
101 return base64.RawURLEncoding.EncodeToString(seg)
102}

Callers 3

SignedStringMethod · 0.95
SigningStringMethod · 0.95
encodeSegmentFunction · 0.80

Calls

no outgoing calls

Tested by 1

encodeSegmentFunction · 0.64