fmt: gofmt
This commit is contained in:
parent
0335e58b12
commit
11bb3f129f
|
|
@ -76,8 +76,8 @@ type Config struct {
|
||||||
AuthJwtSecret string
|
AuthJwtSecret string
|
||||||
AuthJwtClaimUsername string
|
AuthJwtClaimUsername string
|
||||||
AuthJwtClaimUserGroup string
|
AuthJwtClaimUserGroup string
|
||||||
AuthHttpHeaderUsername string
|
AuthHttpHeaderUsername string
|
||||||
AuthHttpHeaderUserGroup string
|
AuthHttpHeaderUserGroup string
|
||||||
DefaultPermissions PermissionsList
|
DefaultPermissions PermissionsList
|
||||||
AccessControlLists []AccessControlList
|
AccessControlLists []AccessControlList
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,7 @@ func startRestAPIServer(globalConfig *config.Config) error {
|
||||||
|
|
||||||
// The JSONPb.EmitDefaults is necssary, so "empty" fields are returned in JSON.
|
// The JSONPb.EmitDefaults is necssary, so "empty" fields are returned in JSON.
|
||||||
mux := runtime.NewServeMux(
|
mux := runtime.NewServeMux(
|
||||||
runtime.WithMetadata(func(ctx context.Context, request *http.Request) metadata.MD {
|
runtime.WithMetadata(parseRequestMetadata),
|
||||||
return parseRequestMetadata(ctx, request)
|
|
||||||
}),
|
|
||||||
runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{
|
runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{
|
||||||
Marshaler: &runtime.JSONPb{
|
Marshaler: &runtime.JSONPb{
|
||||||
MarshalOptions: protojson.MarshalOptions{
|
MarshalOptions: protojson.MarshalOptions{
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package httpservers;
|
package httpservers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/golang-jwt/jwt/v4"
|
|
||||||
"fmt"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"github.com/golang-jwt/jwt/v4"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -65,4 +65,3 @@ func parseJwtCookie(request *http.Request) (string, string) {
|
||||||
|
|
||||||
return username, usergroup
|
return username, usergroup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue