Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/auth0-samples/auth0-golang-api-samples
/ functions
Functions
14 in github.com/auth0-samples/auth0-golang-api-samples
⨍
Functions
14
◇
Types & classes
3
↓ 1 callers
Method
HasScope
HasScope checks whether our claims have a specific scope.
01-Quickstart-Go-API/internal/auth/claims.go:34
↓ 1 callers
Method
HasScope
HasScope checks whether our claims have a specific scope.
01-Authorization-RS256/middleware/jwt.go:29
Function
EnsureValidToken
EnsureValidToken is a middleware that will check the validity of our JWT.
01-Authorization-RS256/middleware/jwt.go:41
Function
LoadAuthConfig
()
01-Quickstart-Go-API/internal/config/auth.go:13
Function
New
New sets up our routes and returns a *http.ServeMux.
01-Authorization-RS256/router/router.go:13
Function
NewMiddleware
(jwtValidator *validator.Validator)
01-Quickstart-Go-API/internal/auth/middleware.go:11
Function
NewValidator
(domain, audience string)
01-Quickstart-Go-API/internal/auth/validator.go:12
Function
PrivateHandler
(w http.ResponseWriter, r *http.Request)
01-Quickstart-Go-API/internal/handlers/api.go:20
Function
PublicHandler
(w http.ResponseWriter, r *http.Request)
01-Quickstart-Go-API/internal/handlers/api.go:12
Function
ScopedHandler
(w http.ResponseWriter, r *http.Request)
01-Quickstart-Go-API/internal/handlers/api.go:28
Method
Validate
Validate ensures the custom claims are properly formatted.
01-Quickstart-Go-API/internal/auth/claims.go:15
Method
Validate
Validate does nothing for this example, but we need it to satisfy validator.CustomClaims interface.
01-Authorization-RS256/middleware/jwt.go:24
Function
main
()
01-Quickstart-Go-API/cmd/server/main.go:17
Function
main
()
01-Authorization-RS256/main.go:12