MCPcopy Create free account
hub / github.com/kataras/iris / GetUserID

Function GetUserID

_examples/auth/jwt/tutorial/api/auth.go:127–129  ·  view source on GitHub ↗

GetUserID returns the current authorized client's user id extracted from claims.

(ctx iris.Context)

Source from the content-addressed store, hash-verified

125
126// GetUserID returns the current authorized client's user id extracted from claims.
127func GetUserID(ctx iris.Context) string {
128 return GetClaims(ctx).UserID
129}
130
131// IsAdmin reports whether the current client has admin access.
132func IsAdmin(ctx iris.Context) bool {

Callers 3

CreateTodoFunction · 0.85
GetTodoFunction · 0.85
ListTodosFunction · 0.85

Calls 1

GetClaimsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…