Documentation ¶
Index ¶
- Constants
- Variables
- func AuthMiddleware(a authenticator.Request) func(http.Handler) http.Handler
- func DecodePayloadAsRawJSON(s string) ([]byte, error)
- func ExtractUserID(dat map[string]interface{}) string
- func ParseToken(jwtToken string) (map[string]interface{}, string, int)
- func StringWithCharset(length int, charset string) string
- type CancelableAuthRequest
- type OIDCConfig
- type UserInfo
Constants ¶
View Source
const DECODE_TOKEN_FAILD = "decode token failed"
View Source
const MALFORMED_TOKEN = "malformed Token"
View Source
const NO_EXP_IN_TOKEN = "no [exp] in oidc token"
View Source
const NO_GROUPS_IN_TOKEN = "no [groups] in oidc token"
View Source
const PARSING_OIDC_TOKEN = "while parsing oidc token: "
View Source
const UNMARSHAL_TOKEN_FAILED = "unmarshal token failed"
Variables ¶
View Source
var L2L3OperatiorRoles = []string{"runtimeAdmin", "runtimeOperator"}
Functions ¶
func AuthMiddleware ¶
func DecodePayloadAsRawJSON ¶
DecodePayloadAsRawJSON extracts the payload and returns the raw JSON.
func ExtractUserID ¶
func StringWithCharset ¶
Types ¶
type CancelableAuthRequest ¶
type CancelableAuthRequest interface { authenticator.Request Cancel() //Cancels (stops) the underlying instance }
Extends authenticator.Request interface with Cancel() function used to stop underlying authenticator instance once it's not needed anymore
func NewOIDCAuthenticator ¶
func NewOIDCAuthenticator(config *OIDCConfig) (CancelableAuthRequest, error)
NewOIDCAuthenticator returns OIDC authenticator wrapped as a CancelableAuthRequest instance. CancelableAuthRequest alows users to cancel the authenticator once it's not used anymore.
Click to show internal directories.
Click to hide internal directories.