Documentation ¶
Index ¶
- func GenerateAccessToken(pAppClientIDstr string, pAppClientSecretStr string, pAudienceStr string, ...) (string, *gf_core.GFerror)
- func GetUserInfo(pAuth0accessTokenStr string, pAuth0domainStr string, ...) (map[string]interface{}, *gf_core.GFerror)
- func Init(pRuntimeSys *gf_core.RuntimeSys) (*GFauthenticator, *GFconfig, *gf_core.GFerror)
- func JWTgetPublicKeyForTenant(pConfig *GFconfig, pRuntimeSys *gf_core.RuntimeSys) (string, *rsa.PublicKey, *gf_core.GFerror)
- func JWTvalidateToken(pTokenStr string, pPubKey *rsa.PublicKey, pRuntimeSys *gf_core.RuntimeSys) (string, *gf_core.GFerror)
- func VerifyIDtoken(pOauth2bearerToken *oauth2.Token, pAuthenticator *GFauthenticator, ...) (*oidc.IDToken, *gf_core.GFerror)
- type GFauthenticator
- type GFconfig
- type GFonLoginSuccessProfileInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAccessToken ¶
func GenerateAccessToken(pAppClientIDstr string, pAppClientSecretStr string, pAudienceStr string, pAuth0appDomainStr string, pCtx context.Context, pRuntimeSys *gf_core.RuntimeSys) (string, *gf_core.GFerror)
-------------------------------------------------------------
func GetUserInfo ¶
func GetUserInfo(pAuth0accessTokenStr string, pAuth0domainStr string, pRuntimeSys *gf_core.RuntimeSys) (map[string]interface{}, *gf_core.GFerror)
pAccessTokenStr - Auth0 Access Token obtained during login
func Init ¶
func Init(pRuntimeSys *gf_core.RuntimeSys) (*GFauthenticator, *GFconfig, *gf_core.GFerror)
func JWTvalidateToken ¶
func JWTvalidateToken(pTokenStr string, pPubKey *rsa.PublicKey, pRuntimeSys *gf_core.RuntimeSys) (string, *gf_core.GFerror)
validate given JWT token. a public key used for JWT signature validation is passed as the argument. function either fails or succeeds and returns if the key is valid.
func VerifyIDtoken ¶
func VerifyIDtoken(pOauth2bearerToken *oauth2.Token, pAuthenticator *GFauthenticator, pCtx context.Context, pRuntimeSys *gf_core.RuntimeSys) (*oidc.IDToken, *gf_core.GFerror)
verifies that an Oauth2 token is a valid *oidc.IDToken.
Types ¶
type GFconfig ¶
type GFconfig struct { // AUTH0_DOMAIN Auth0domainStr string // CLIENT_ID/SECRET Auth0clientIDstr string Auth0clientSecretStr string // AUDIENCE Auth0apiAudienceStr string // CALLBACK_URLS Auth0loginCallbackURLstr string Auth0logoutCallbackURLstr string }
func LoadConfig ¶
func LoadConfig(pRuntimeSys *gf_core.RuntimeSys) *GFconfig
load Auth0 config, mostly from ENV vars
Click to show internal directories.
Click to hide internal directories.