oauth2

package
v0.0.0-...-d7d1a91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEYCLOAK_AUTH_URL  = "http://localhost:8080/auth"
	KEYCLOAK_REALM     = "go"
	KEYCLOAK_CLIENT_ID = "go-sso"
)

Variables

This section is empty.

Functions

func GetAuthUrl

func GetAuthUrl() string

func GetClientId

func GetClientId() string

func GetRealm

func GetRealm() string

func GetResource

func GetResource() string

func IsAuthorized

func IsAuthorized(verifier *oidc.IDTokenVerifier, role string, endpoint func(http.ResponseWriter, *http.Request)) http.Handler

Types

type RealmAccess

type RealmAccess struct {
	RealmAccess Roles `json:"realm_access"`
}

type Roles

type Roles struct {
	Roles []string `json:"roles"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL