{"modulePath":"github.com/codedellemc/libstorage","version":"v0.6.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package auth\n\n## Functions\n\n```go\nfunc GetBearerTokenFromReq(ctx types.Context, req *http.Request) string\n```\nGetBearerTokenFromReq retrieves the bearer token from the HTTP request.\n\n```go\nfunc ValidateAuthTokenWithCtx(\n\tctx types.Context,\n\tconfig *types.AuthConfig) (*types.AuthToken, error)\n```\nValidateAuthTokenWithCtx validates the auth token from the provided context.\n\n```go\nfunc ValidateAuthTokenWithCtxOrReq(\n\tctx types.Context,\n\tconfig *types.AuthConfig,\n\treq *http.Request) (*types.AuthToken, error)\n```\nValidateAuthTokenWithCtxOrReq validates the auth token from the provided context. If not present in the context attempt a validation against the provided HTTP request.\n\n```go\nfunc ValidateAuthTokenWithJWT(\n\tctx types.Context,\n\tconfig *types.AuthConfig,\n\tencJWT string) (*types.AuthToken, error)\n```\nValidateAuthTokenWithJWT validates the auth token from the provided JWT.\n\n```go\nfunc ValidateAuthTokenWithReq(\n\tctx types.Context,\n\tconfig *types.AuthConfig,\n\treq *http.Request) (*types.AuthToken, error)\n```\nValidateAuthTokenWithReq validates the auth token from the provided HTTP req.\n\n","path":"github.com/codedellemc/libstorage/api/server/auth","name":"auth","synopsis":"","isRedistributable":true}
