package
0.0.0-20230607163802-6dfea2537d1a
Repository: https://github.com/rose839/iam.git
Documentation: pkg.go.dev
# Packages
Package auth defines authentication strategy like Basic, Bearer.
# Functions
Context is a middleware that injects common prefix fields to gin.Context.
Cors add cors headers.
No description provided by the author
GetRequestIDFromContext returns 'RequestID' from the given context if present.
GetRequestIDFromHeaders returns 'RequestID' from the headers if present.
Limit drops (HTTP status 429) the request if the limit is reached.
No description provided by the author
No description provided by the author
NoCache is a middleware function that appends headers to prevent the client from caching the HTTP response.
Options is a middleware function that appends headers for options requests and aborts then exits the middleware chain and ends the request.
Publish publish a redis event to specified redis channel when some action occurred.
Add request id if no request id found in request headers.
Secure is a middleware function that appends security and resource access headers.
Validation make sure users have the right resource permission and operation.
# Constants
Define Redis pub/sub events.
Define Redis pub/sub events.
Define Redis pub/sub events.
No description provided by the author
No description provided by the author
XRequestIDKey defines X-Request-ID key string.
# Variables
ErrorLimitExceeded defines Limit exceeded error.
Middlewares store registered middlewares.
# Structs
AuthOperator is used to switch between different authentication strategy.
# Interfaces
AuthStrategy defines the set of methods used to do resource authentication.