2 configurations for the listeners are now possible: - enableJWT=false with client ssl auth - enableJWT=true with https Actual verification of the tokens is handled by https://github.com/openshift-online/ocm-sdk-go. An authentication handler is run as the top level handler, before any routing is done. Routes which do not require authentication should be listed as exceptions. Authentication can be restricted using an ACL file which allows filtering based on JWT claims. For more information see the inline comments in ocm-sdk/authentication. As an added quirk the `-v` flag for the osbuild-composer executable was changed to `-verbose` to avoid flag collision with glog which declares the `-v` flag in the package `init()` function. The ocm-sdk depends on glog and pulls it in.
82 lines
1.3 KiB
Go
82 lines
1.3 KiB
Go
package jsoniter
|
|
|
|
import "fmt"
|
|
|
|
type invalidAny struct {
|
|
baseAny
|
|
err error
|
|
}
|
|
|
|
func newInvalidAny(path []interface{}) *invalidAny {
|
|
return &invalidAny{baseAny{}, fmt.Errorf("%v not found", path)}
|
|
}
|
|
|
|
func (any *invalidAny) LastError() error {
|
|
return any.err
|
|
}
|
|
|
|
func (any *invalidAny) ValueType() ValueType {
|
|
return InvalidValue
|
|
}
|
|
|
|
func (any *invalidAny) MustBeValid() Any {
|
|
panic(any.err)
|
|
}
|
|
|
|
func (any *invalidAny) ToBool() bool {
|
|
return false
|
|
}
|
|
|
|
func (any *invalidAny) ToInt() int {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToInt32() int32 {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToInt64() int64 {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToUint() uint {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToUint32() uint32 {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToUint64() uint64 {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToFloat32() float32 {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToFloat64() float64 {
|
|
return 0
|
|
}
|
|
|
|
func (any *invalidAny) ToString() string {
|
|
return ""
|
|
}
|
|
|
|
func (any *invalidAny) WriteTo(stream *Stream) {
|
|
}
|
|
|
|
func (any *invalidAny) Get(path ...interface{}) Any {
|
|
if any.err == nil {
|
|
return &invalidAny{baseAny{}, fmt.Errorf("get %v from invalid", path)}
|
|
}
|
|
return &invalidAny{baseAny{}, fmt.Errorf("%v, get %v from invalid", any.err, path)}
|
|
}
|
|
|
|
func (any *invalidAny) Parse() *Iterator {
|
|
return nil
|
|
}
|
|
|
|
func (any *invalidAny) GetInterface() interface{} {
|
|
return nil
|
|
}
|