Documentation ¶
Overview ¶
Package secretsmanagerauth provides a package for authenticating with credentials stored in Secrets Manager.
Examples ¶
SignIn
func main() { sess := session.Must(session.NewSession(&aws.Config{Region: aws.String("eu-west-1")})) sess = aws_trace.WrapSession(sess) ctx := context.Background() conf := auth.Config{ WithDatadogTracing bool // used when you trace your application with Datadog WithOpenCensusTracing bool // default and used when you trace your application with Open Census ServiceName string // needed when using lambda and Datadog for tracing AWSSession: sess, AWSSecretsManagerAccount: "...", AWSSecretsManagerRegion: "eu-west-1", Stage: "sandbox", SecretKey: "user-credentials/iot_service", } auth.Configure(conf) fmt.Println(auth.SignIn(ctx)) fmt.Println(auth.GetTokens()) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { WithDatadogTracing bool // used when you trace your application with Datadog WithOpenCensusTracing bool // default and used when you trace your application with Open Census ServiceName string // needed when using lambda and Datadog for tracing AWSSession *session.Session AWSSecretsManagerAccount string AWSSecretsManagerRegion string SecretKey string Stage string }
Config is the configuration of the package
Click to show internal directories.
Click to hide internal directories.