Giter Site home page Giter Site logo

ykmango's Introduction

License GoDoc Go Report Card CircleCI CodeCov

YKManGo

๐Ÿ”‘ Prompt a YubiKey device to generate an OATH code

Installing

You can fetch this library by running the following

go get -u github.com/joshdk/ykmango

Additionally, this library has a runtime dependency on ykman which must be installed before use.

Usage

import (
	"fmt"
	"github.com/joshdk/ykmango"
)

// List the currently configured OATH slot names.
names, err := ykman.List()
if err != nil {
	panic(err.Error())
}

for _, name := range names {
	fmt.Printf("Found code named: %s\n", name)
	// Found code named: aws-mfa
}

// Generate an OATH code using the given slot name.
// You may need to touch your YubiKey device if the
// slot is configured to require touch.
code, err := ykman.Generate("aws-mfa")
if err != nil {
	panic(err.Error())
}

fmt.Printf("Your code is: %s\n", code)
// Your code is: 150509

License

This library is distributed under the MIT License, see LICENSE.txt for more information.

ykmango's People

Contributors

joshdk avatar samclinckspoor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ykmango's Issues

Release 0.0.0 without any code

When using glide it asks for using the release 0.0.0:

[INFO]	Attempting to get package github.com/joshdk/ykmango
[INFO]	--> Gathering release information for github.com/joshdk/ykmango
[INFO]	The package github.com/joshdk/ykmango appears to have Semantic Version releases (http://semver.org).
[INFO]	The latest release is 0.0.0. You are currently not using a release. Would you like
[INFO]	to use this release? Yes (Y) or No (N)

Unfortunately 0.0.0 does not contain any code.

Can you please retract and re-release? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.