Skip to content

Commit 21615aa

Browse files
committed
Update structs in authenticator.go to have full json tags.
1 parent eb5bba0 commit 21615aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

authenticator/authenticator.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const (
1717
// registration URI for any authenticator app, e.g.: Google Authenticator, Authy,
1818
// etc.
1919
type KeyUri struct {
20-
Type string // hotp | totp
21-
Label Label
22-
Parameters paramsFormatter
20+
Type string `json:"type"` // hotp | totp
21+
Label Label `json:"label"`
22+
Parameters paramsFormatter `json:"parameters"`
2323
}
2424

2525
// String encodes all the KeyUri info as a valid URI.
@@ -51,8 +51,8 @@ func (ku *KeyUri) QRCode() (string, error) {
5151

5252
// The Label is used to identify which account a key is associated with.
5353
type Label struct {
54-
AccountName string // Should be a username, email, etc.
55-
Issuer string // Should be the domain, company, org that is issuing the auth
54+
AccountName string `json:"accountName"` // Should be a username, email, etc.
55+
Issuer string `json:"issuer"` // Should be the domain, company, org that is issuing the auth
5656
}
5757

5858
// The String method will encode the Label in a valid format to be included in

0 commit comments

Comments
 (0)