auth0login

package
v4.38.16 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Contains all the code needed to do an Auth0 login and retrieve a JWT. This is useful for command line tools that access the API and for integration tests It is not intended to be used by the API runtime itself, that should only ever parse JWTs passed to it in HTTP requests, it shouldn't generate an Auth0 JWT for any internal reasons

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJWT

func GetJWT(username string, password string, clientID string, clientSecret string, auth0domain string, redirectURI string, audience string, scope string) (string, error)

GetJWT performs an Auth0 login using the parameters and returns the JWT if successful

func InitAuth0ManagementAPI

func InitAuth0ManagementAPI(cfg config.APIConfig) (*management.Management, error)

Types

type Auth0TokenResponse

type Auth0TokenResponse struct {
	AccessToken string `json:"access_token"`
	IDToken     string `json:"id_token"`
	Scope       string `json:"scope"`
	ExpiresIn   int    `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

Auth0TokenResponse - The token response type

Jump to

Keyboard shortcuts

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