We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f026ea9 commit d12f406Copy full SHA for d12f406
1 file changed
bearertoken/bearertoken.go
@@ -7,3 +7,12 @@ package bearertoken
7
// Token represents a bearer token, generally sent by a REST client in a
8
// Authorization or Cookie header for authentication purposes.
9
type Token string
10
+
11
+func (t Token) MarshalText() ([]byte, error) {
12
+ return []byte(t), nil
13
+}
14
15
+func (t *Token) UnmarshalText(text []byte) error {
16
+ *t = Token(text)
17
+ return nil
18
0 commit comments