package
5.0.2+incompatible
Repository: https://github.com/meateam/api-gateway.git
Documentation: pkg.go.dev

# Functions

ExtractTokenFromHeader extracts the token from the header and returns it as a string.
NewOAuthMiddleware generates a middleware.
SetApmClient adds a clientID to the current apm transaction.

# Constants

AuthHeader is the key of the authorization header.
AuthHeaderBearer is the prefix for the authorization token in AuthHeader.
AuthTypeHeader is the key of the service-host header.
AuthUserHeader is the key of the header which indicates whether an action is made on behalf of a user.
CargoAppID is the app ID of the cargo client.
CargoAuthTypeValue is the value of the AuthTypeHeader key for the Cargo services.
ConfigCtsDest is the name of the environment variable containing the cts dest name.
ConfigTomcalDest is the name of the environment variable containing the tomcal dest name.
ContextAppKey is the context key used to get and set the client's appID in the context.
ContextAuthType is the context key used to get and set the auth type of the client in the context.
ContextScopesKey is the context key used to get and set the client's scopes in the context.
DeleteScope is the scope required for file deletion.
DownloadScope is the scope required for file download.
DriveAppID is the app ID of the drive client.
DropboxAppID is the app ID of the dropbox client.
DropboxAuthTypeValue is the value of the AuthTypeHeader key for the Dropbox services.
GetFileScope is the scope required for getting a file's metadata.
ServiceAuthCodeTypeValue is the value of service using the authorization code flow for AuthTypeHeader key.
ShareScope is the scope required for file share and unshare.
TransactionClientLabel is the label of the custom transaction field : client-name.
UpdatePermitStatusScope is the scope name required for updating a permit's scope.
UploadScope is the scope required for upload.

# Structs

Middleware is a structure that handles the authentication middleware.