Documentation ¶
Index ¶
- Constants
- type CorsMiddleware
- type Jwt
- func (this Jwt) Parse(token string) (username string, user string, roles []string, clientId string, err error)
- func (this Jwt) ParseHeader(header string) (username string, user string, roles []string, clientId string, err error)
- func (this Jwt) ParseRequest(request *http.Request) (username string, user string, roles []string, clientId string, err error)
- func (this Jwt) ParseToken(token string) (username string, user string, roles []string, clientId string, err error)
- type LoggerMiddleWare
- type ResponseWriterWithStatusCodeLog
Constants ¶
View Source
const PEM_BEGIN = "-----BEGIN PUBLIC KEY-----"
View Source
const PEM_END = "-----END PUBLIC KEY-----"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CorsMiddleware ¶
type CorsMiddleware struct {
// contains filtered or unexported fields
}
func NewCors ¶
func NewCors(handler http.Handler) *CorsMiddleware
func (*CorsMiddleware) ServeHTTP ¶
func (this *CorsMiddleware) ServeHTTP(res http.ResponseWriter, req *http.Request)
type Jwt ¶
type Jwt struct {
// contains filtered or unexported fields
}
func NewJwt ¶
func NewJwt(config configuration.Config) Jwt
func (Jwt) ParseHeader ¶
func (Jwt) ParseRequest ¶
type LoggerMiddleWare ¶
type LoggerMiddleWare struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(handler http.Handler) *LoggerMiddleWare
func (*LoggerMiddleWare) ServeHTTP ¶
func (this *LoggerMiddleWare) ServeHTTP(w http.ResponseWriter, request *http.Request)
type ResponseWriterWithStatusCodeLog ¶
type ResponseWriterWithStatusCodeLog struct { Parent http.ResponseWriter Status int }
func (*ResponseWriterWithStatusCodeLog) Header ¶
func (this *ResponseWriterWithStatusCodeLog) Header() http.Header
func (*ResponseWriterWithStatusCodeLog) Write ¶
func (this *ResponseWriterWithStatusCodeLog) Write(payload []byte) (int, error)
func (*ResponseWriterWithStatusCodeLog) WriteHeader ¶
func (this *ResponseWriterWithStatusCodeLog) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.