Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMyAccountHandler ¶
func GetMyAccountHandler(w http.ResponseWriter, r *http.Request)
GetMyAccountHandler retrieves the user information from the OIDC context and responds with the user details.
If the user is not found in the context or an error occurs, an HTTP 401 Unauthorized error is returned.
func GetMyPgRoleHandler ¶
func GetMyPgRoleHandler() http.HandlerFunc
func GetSimpleAuthzHandler ¶
func GetSimpleAuthzHandler(w http.ResponseWriter, r *http.Request)
GetSimpleAuthzHandler performs an authorization check based on a requested /endpoint/{claim}/{value} path eg `GET /endpoint/editor/true` will check if the user has the claim `editor` with the value `true` The response is an `AuthzResponse` object indicating whether the user is authorized (Allowed: true) or not (Allowed: false)
func HealthHandler ¶
func HealthHandler(w http.ResponseWriter, r *http.Request)
HealthHandler returns the request ID as a plain text response with a 200 OK status code.
Types ¶
type AuthzResponse ¶
type AuthzResponse struct {
Allowed bool `json:"allowed"`
}
Click to show internal directories.
Click to hide internal directories.