Skip to content

Commit

Permalink
Merge pull request pquerna#21 from rohitshriwas/otp.key.URL
Browse files Browse the repository at this point in the history
Add otp.key.URL() method
  • Loading branch information
pquerna authored Aug 21, 2017
2 parents b7b8925 + d8a0192 commit 1baa031
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ func (k *Key) Secret() string {
return q.Get("secret")
}

// URL returns the OTP URL as a string
func (k *Key) URL() string {
return k.url.String()
}

// Algorithm represents the hashing function to use in the HMAC
// operation needed for OTPs.
type Algorithm int
Expand Down

0 comments on commit 1baa031

Please sign in to comment.