Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mschwager/duo_go
An implementation of the Duo Security Web SDK in Go/Golang.
https://github.com/mschwager/duo_go
2fa demo duo go golang websdk
Last synced: about 2 months ago
JSON representation
An implementation of the Duo Security Web SDK in Go/Golang.
- Host: GitHub
- URL: https://github.com/mschwager/duo_go
- Owner: mschwager
- License: apache-2.0
- Created: 2016-11-12T21:53:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T15:34:57.000Z (over 4 years ago)
- Last Synced: 2024-06-20T07:51:06.017Z (7 months ago)
- Topics: 2fa, demo, duo, go, golang, websdk
- Language: Go
- Homepage: https://duo.com/docs/duoweb
- Size: 16.6 KB
- Stars: 13
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
[![Build Status](https://travis-ci.org/mschwager/duo_go.svg?branch=master)](https://travis-ci.org/mschwager/duo_go)
[![Coverage Status](https://coveralls.io/repos/github/mschwager/duo_go/badge.svg?branch=master)](https://coveralls.io/github/mschwager/duo_go?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/mschwager/duo_go)](https://goreportcard.com/report/github.com/mschwager/duo_go)
[![Pkg.Go.Dev](https://img.shields.io/badge/pkg.go.dev-reference-blue?style=flat&logo=go)](https://pkg.go.dev/github.com/mschwager/duo_go)
[![Module Version](https://img.shields.io/github/v/tag/mschwager/duo_go?label=version&logo=go)](https://pkg.go.dev/mod/github.com/mschwager/duo_go)**duo_go** - Duo 2FA for Go web applications: https://duo.com/docs/duoweb
# Installing
```
$ go get github.com/mschwager/duo_go
```# Using
Here's a short snippet of code demonstrating the library:
```go
package mainimport (
"fmt"
"github.com/mschwager/duo_go"
)func main() {
duo_configuration := &duo_go.Web{
Ikey: "",
Skey: "",
Akey: "",
}
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
Configure your `ikey`, `skey`, `akey`, and `host`, in `duo_go_demo.go`.
Then run the following command:
```
$ go run duo_go_demo/duo_go_demo.go
```# Testing
```
$ go test
```