package
21.0.0+incompatible
Repository: https://github.com/sshcom/privx-sdk-go.git
Documentation: pkg.go.dev
# Functions
Access setups client access key.
Digest setups client secret digest.
Secret setups clients secret key.
UseConfigFile setup credential from tol file.
UseEnvironment setup credential from environment variables.
With implements fallback auth strategy, it choose the desired
strategy depends on provided configuration options.
WithClientID executes OAuth2 Resource Owner Password Grant
It uses access/secret key pair to authenticate client
auth := oauth2.WithClientID(
restapi.New(...),
oauth2.Access(...),
oauth2.Secret(...),
)
client := restapi.New(
restapi.Auth(auth),
restapi.Endpoint("https://privx.example.com"),
)
rolestore.New(client)
*/.
WithCredential executes OAuth2 Authorization Code Grant
It uses access/secret key pair to authenticate client
auth := oauth2.WithCredential(
oauth2.Access(...),
oauth2.Secret(...),
oauth2.Transport(...),
)
client := restapi.New(
restapi.Auth(auth),
restapi.Endpoint("https://privx.example.com"),
)
rolestore.New(client)
*/.
WithToken uses explicitly defined JWT to authenticate client
*/.
# Structs
AccessToken contains OAuth2 access token information.
# Type aliases
Option is configuration applied to the client.