Skip to content

Commit

Permalink
Added short snippet in README demonstrating the library
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager committed Nov 14, 2016
1 parent 9cfd816 commit c0d499e
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,34 @@ $ go get github.com/mschwager/duo_go

# Using

TODO
Here's a short snippet of code demonstrating the library:

```go
package main

import (
"fmt"
"github.com/mschwager/duo_go"
)

func main() {
duo_configuration := &duo_go.Web{
Ikey: "<ikey-here>",
Skey: "<skey-here>",
Akey: "<akey-here>",
}
sig_request, _ := duo_go.SignRequest(duo_configuration, "example_username")

fmt.Println("Signature request: " + sig_request)
}
```

```
$ go run example.go
Signature request: TX|ZXh...|5ce...:APP|ZXh...|fc2...
```

For a more complete example, checkout the demo code.

# Demo

Expand Down

0 comments on commit c0d499e

Please sign in to comment.