Documentation
¶
Overview ¶
Example ¶
package main import ( "fmt" "github.com/stripe/go-confidant-client/kmsauth" ) func main() { // KMS key to use for authentication key := "key" // The service being authenticated to := "confidant" // The user for whom the token is being generated from := "username" userType := "user" region := "us-east-1" generator := kmsauth.NewTokenGenerator(key, to, from, userType, region) username := generator.GetUsername() token, err := generator.GetToken() if err != nil { fmt.Println(err) } fmt.Println(username, token) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenGenerator ¶
func NewTokenGenerator ¶
func NewTokenGenerator(keyID, to string, from string, userType string, region string) TokenGenerator
func (*TokenGenerator) GetToken ¶
func (g *TokenGenerator) GetToken() (string, error)
func (*TokenGenerator) GetUsername ¶
func (g *TokenGenerator) GetUsername() string
Click to show internal directories.
Click to hide internal directories.