credentials

package module
v0.0.0-...-516d846 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 2 Imported by: 0

README

H1-credentials-helper-go

Providers

Passport provider

Passport provider is based on passport file which can be generated using h1-cli.

Usage
package main


import (
    "log"

    "github.com/kuskoman/h1-credentials-helper-go"
)

func main() {
    provider, err := h1.GetPassportCredentialsHelper("") // empty string means that the library should look for passport file in ~/.h1/passport.json
    // if you have this file in different location you can pass it to this function

    if err != nil {
        log.Panic(err)
    }

    token, err := provider.GetToken("exampleAudience")

    // [...]
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPassportCredentialsHelper

func GetPassportCredentialsHelper(location string) (providers.TokenAuthProvider, error)

GetPassportCredentialsHelper creates credentials helper using HyperOne passport file

Types

This section is empty.

Directories

Path Synopsis
auth
jwt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL