https://github.com/hyperonecom/h1-credentials-helper-go
https://github.com/hyperonecom/h1-credentials-helper-go
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hyperonecom/h1-credentials-helper-go
- Owner: hyperonecom
- License: mit
- Created: 2020-12-07T12:32:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-13T10:37:30.000Z (almost 4 years ago)
- Last Synced: 2025-03-06T10:45:40.972Z (11 months ago)
- Language: Go
- Size: 24.4 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# H1-credentials-helper-go
## Providers
### Passport provider
Passport provider is based on passport file which can be generated using [h1-cli](https://github.com/hyperonecom/h1-cli).
#### Usage
```go
package main
import (
"log"
"github.com/hyperonecom/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")
// [...]
}
```