auth0sdk

package module
v0.0.0-...-4844820 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: MIT Imports: 6 Imported by: 0

README

Auth0-SDK for Go (golang)

Go Report GolangCI Travis codecov License Maintenance GoDoc

Features:

  • Full Auth0-SDK for Go (golang)
  • Uses restly for API calls
  • Simple to understand, fix issues (if any), and add-on
  • Only about 650 LOC
go get github.com/apibillme/auth0-sdk

Example

func main() {
	auth0Domain := "example.auth0.com"
	clientID := "XVJEKJDKJF"
	clientSecret := "secret"

	err = auth0sdk.New(auth0Domain, clientID, clientSecret)
	if err != nil {
		log.Panic(err)
	}
	clients, statusCode, err := auth0sdk.GetClients("")
	if err != nil {
		log.Panic(err)
	}
	if statusCode == 200 {
		for _, client := range clients.Array() {
			name := client.Get("name").String()
			log.Println(name)
		}
	}
}

Demo

Demo for Auth0-SDK

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuthenticator

func AddAuthenticator(authenticatorTypes []string, oobChannels string, phoneNumber string) (gjson.Result, int, error)

AddAuthenticator - adds an authenticator

func ChallengeMFA

func ChallengeMFA(mfaToken string, challengeType string) (gjson.Result, int, error)

ChallengeMFA - challenge MFA token

func ChangePassword

func ChangePassword(email string, password string, connection string) (gjson.Result, int, error)

ChangePassword - change password for user

func ConfigureEmailProvider

func ConfigureEmailProvider(body string) (gjson.Result, int, error)

ConfigureEmailProvider - configure the email provider

func CreateClient

func CreateClient(body string) (gjson.Result, int, error)

CreateClient - create a client

func CreateClientGrant

func CreateClientGrant(body string) (gjson.Result, int, error)

CreateClientGrant - create a client grant

func CreateConnection

func CreateConnection(body string) (gjson.Result, int, error)

CreateConnection - create connection

func CreateCustomDomain

func CreateCustomDomain(body string) (gjson.Result, int, error)

CreateCustomDomain - create a custom domain

func CreateDeviceCredential

func CreateDeviceCredential(body string) (gjson.Result, int, error)

CreateDeviceCredential - create a device credential

func CreateEmailTemplate

func CreateEmailTemplate(body string) (gjson.Result, int, error)

CreateEmailTemplate - create an email template

func CreateEmailVerificationTicket

func CreateEmailVerificationTicket(body string) (gjson.Result, int, error)

CreateEmailVerificationTicket - create email verification ticket

func CreateGuardianEnrollmentTicket

func CreateGuardianEnrollmentTicket(body string) (gjson.Result, int, error)

CreateGuardianEnrollmentTicket - create a guardian enrollment ticket

func CreatePasswordChangeTicket

func CreatePasswordChangeTicket(body string) (gjson.Result, int, error)

CreatePasswordChangeTicket - carete a password change ticket

func CreateResourceServer

func CreateResourceServer(body string) (gjson.Result, int, error)

CreateResourceServer - create resource server

func CreateRule

func CreateRule(body string) (gjson.Result, int, error)

CreateRule - create a rule

func CreateUser

func CreateUser(body string) (gjson.Result, int, error)

CreateUser - create a user

func DeleteClient

func DeleteClient(id string) (gjson.Result, int, error)

DeleteClient - delete a client

func DeleteClientGrant

func DeleteClientGrant(id string) (gjson.Result, int, error)

DeleteClientGrant - delete a client grant

func DeleteConnection

func DeleteConnection(id string) (gjson.Result, int, error)

DeleteConnection - delete a connection

func DeleteConnectionUser

func DeleteConnectionUser(id string, query string) (gjson.Result, int, error)

DeleteConnectionUser - delete a connection user

func DeleteCustomDomain

func DeleteCustomDomain(id string) (gjson.Result, int, error)

DeleteCustomDomain - delete a custom domain

func DeleteDeviceCredential

func DeleteDeviceCredential(id string) (gjson.Result, int, error)

DeleteDeviceCredential - delete a device credential

func DeleteEmailProvider

func DeleteEmailProvider() (gjson.Result, int, error)

DeleteEmailProvider - delete the email provider - use with caution

func DeleteGrant

func DeleteGrant(id string) (gjson.Result, int, error)

DeleteGrant - delete a grant

func DeleteGuardianEnrollment

func DeleteGuardianEnrollment(id string) (gjson.Result, int, error)

DeleteGuardianEnrollment - delete a guardian enrollment

func DeleteResourceServer

func DeleteResourceServer(id string) (gjson.Result, int, error)

DeleteResourceServer - delete a resource server

func DeleteRule

func DeleteRule(id string) (gjson.Result, int, error)

DeleteRule - delete a rule

func DeleteRulesConfig

func DeleteRulesConfig(key string) (gjson.Result, int, error)

DeleteRulesConfig - delete a rules config

func DeleteUser

func DeleteUser(id string) (gjson.Result, int, error)

DeleteUser - delete a user

func DeleteUserBlock

func DeleteUserBlock(id string) (gjson.Result, int, error)

DeleteUserBlock - delete a user block

func DeleteUserBlockByIdentifier

func DeleteUserBlockByIdentifier(query string) (gjson.Result, int, error)

DeleteUserBlockByIdentifier - delete a user block by identifier

func DeleteUserMultifactorProvider

func DeleteUserMultifactorProvider(id string, provider string) (gjson.Result, int, error)

DeleteUserMultifactorProvider - delete a user's multifactor provider

func ExportUsers

func ExportUsers(body string) (gjson.Result, int, error)

ExportUsers - create a job to export users

func GenerateGuardianRecoveryCode

func GenerateGuardianRecoveryCode(userID string) (gjson.Result, int, error)

GenerateGuardianRecoveryCode - generate a new guardian recovery code for a user

func GetActiveUserCount

func GetActiveUserCount() (gjson.Result, int, error)

GetActiveUserCount - get active user count

func GetBlacklist

func GetBlacklist(query string) (gjson.Result, int, error)

GetBlacklist - get the blacklist

func GetClient

func GetClient(id string, query string) (gjson.Result, int, error)

GetClient - get a client

func GetClientGrants

func GetClientGrants(query string) (gjson.Result, int, error)

GetClientGrants - get all client grants

func GetClients

func GetClients(query string) (gjson.Result, int, error)

GetClients - get all clients

func GetConnection

func GetConnection(id string, query string) (gjson.Result, int, error)

GetConnection - get a connection

func GetConnections

func GetConnections(query string) (gjson.Result, int, error)

GetConnections - get all connections

func GetCustomDomain

func GetCustomDomain(id string) (gjson.Result, int, error)

GetCustomDomain - get a custom domain

func GetCustomDomains

func GetCustomDomains() (gjson.Result, int, error)

GetCustomDomains - get all custom domains

func GetDailyStats

func GetDailyStats(query string) (gjson.Result, int, error)

GetDailyStats - gets the number of logins that occurred int he entered data range

func GetDeviceCredentials

func GetDeviceCredentials(query string) (gjson.Result, int, error)

GetDeviceCredentials - get all device credentials

func GetEmailProvider

func GetEmailProvider(query string) (gjson.Result, int, error)

GetEmailProvider - get the email provider

func GetEmailTemplate

func GetEmailTemplate(emailTemplate string) (gjson.Result, int, error)

GetEmailTemplate - get an email template

func GetFailedJob

func GetFailedJob(id string) (gjson.Result, int, error)

GetFailedJob - get a failed job

func GetGrants

func GetGrants(query string) (gjson.Result, int, error)

GetGrants - get all grants

func GetGuardianEnrollment

func GetGuardianEnrollment(id string) (gjson.Result, int, error)

GetGuardianEnrollment - get a guardian enrollment

func GetGuardianEnrollmentTemplates

func GetGuardianEnrollmentTemplates() (gjson.Result, int, error)

GetGuardianEnrollmentTemplates - get all guardian enrollment and verification templates

func GetGuardianFactors

func GetGuardianFactors() (gjson.Result, int, error)

GetGuardianFactors - get a list of factors and statuses for guardian

func GetGuardianSNSConfig

func GetGuardianSNSConfig() (gjson.Result, int, error)

GetGuardianSNSConfig - get guardian AWS SNS factor provider configuration

func GetGuardianTwilioConfig

func GetGuardianTwilioConfig() (gjson.Result, int, error)

GetGuardianTwilioConfig - get guardian Twilio factor provider configuration

func GetJob

func GetJob(id string) (gjson.Result, int, error)

GetJob - get a job

func GetJobResults

func GetJobResults(id string) (gjson.Result, int, error)

GetJobResults - get the results of a job

func GetLog

func GetLog(id string) (gjson.Result, int, error)

GetLog - get log

func GetResourceServer

func GetResourceServer(id string) (gjson.Result, int, error)

GetResourceServer - get a resource server

func GetResourceServers

func GetResourceServers(query string) (gjson.Result, int, error)

GetResourceServers - get all resource servers

func GetRule

func GetRule(id string, query string) (gjson.Result, int, error)

GetRule - get a rule

func GetRules

func GetRules(query string) (gjson.Result, int, error)

GetRules - get all rules

func GetRulesConfigs

func GetRulesConfigs() (gjson.Result, int, error)

GetRulesConfigs - get all rules configs

func GetTenantSettings

func GetTenantSettings() (gjson.Result, int, error)

GetTenantSettings - get tenant settings

func GetUser

func GetUser(id string, query string) (gjson.Result, int, error)

GetUser - get a user

func GetUserBlock

func GetUserBlock(id string) (gjson.Result, int, error)

GetUserBlock - get a user block

func GetUserBlocksByIdentifier

func GetUserBlocksByIdentifier(query string) (gjson.Result, int, error)

GetUserBlocksByIdentifier - get user blocks by identifier

func GetUserGuardianEnrollments

func GetUserGuardianEnrollments(id string) (gjson.Result, int, error)

GetUserGuardianEnrollments - get a user's guardian enrollments

func GetUserLog

func GetUserLog(id string, query string) (gjson.Result, int, error)

GetUserLog - get a user's log

func ImportUsers

func ImportUsers(query string) (gjson.Result, int, error)

ImportUsers - create a job to import users

func LinkUser

func LinkUser(id string, body string) (gjson.Result, int, error)

LinkUser - link a user

func New

func New(auth0Domain string, clientID string, clientSecret string) error

New - create new Auth0 client

func Passwordless

func Passwordless(connection string, email string, phoneNumber string, send string, authParams string) (gjson.Result, int, error)

Passwordless - passwordless

func PatchEmailTemplate

func PatchEmailTemplate(emailTemplate string, body string) (gjson.Result, int, error)

PatchEmailTemplate - patch an email template

func RotateClientSecret

func RotateClientSecret(id string) (gjson.Result, int, error)

RotateClientSecret - rotate the client secret

func SearchLog

func SearchLog(query string) (gjson.Result, int, error)

SearchLog - search log

func SearchUserByEmail

func SearchUserByEmail(query string) (gjson.Result, int, error)

SearchUserByEmail - search for a user by email

func SearchUsers

func SearchUsers(query string) (gjson.Result, int, error)

SearchUsers - search or list users

func SetRulesConfig

func SetRulesConfig(key string, body string) (gjson.Result, int, error)

SetRulesConfig - set a rules config

func Signup

func Signup(email string, password string, connection string, userMetadata string) (gjson.Result, int, error)

Signup - sign up user

func UnlinkUserIdentity

func UnlinkUserIdentity(id string, provider string, userID string) (gjson.Result, int, error)

UnlinkUserIdentity - unlink a user's identity

func UpdateBlacklist

func UpdateBlacklist(body string) (gjson.Result, int, error)

UpdateBlacklist - add a token to the blacklist

func UpdateClient

func UpdateClient(id string, body string) (gjson.Result, int, error)

UpdateClient - update a client

func UpdateClientGrant

func UpdateClientGrant(id string, body string) (gjson.Result, int, error)

UpdateClientGrant - update client grant

func UpdateConnection

func UpdateConnection(id string, body string) (gjson.Result, int, error)

UpdateConnection - update a connection

func UpdateEmailProvider

func UpdateEmailProvider(body string) (gjson.Result, int, error)

UpdateEmailProvider - update the email provider

func UpdateEmailTemplate

func UpdateEmailTemplate(emailTemplate string, body string) (gjson.Result, int, error)

UpdateEmailTemplate - update an email template

func UpdateGuardianEnrollmentTemplates

func UpdateGuardianEnrollmentTemplates(body string) (gjson.Result, int, error)

UpdateGuardianEnrollmentTemplates - update a guardian enrollment and verification template

func UpdateGuardianFactor

func UpdateGuardianFactor(name string, body string) (gjson.Result, int, error)

UpdateGuardianFactor - update guardian factor

func UpdateGuardianTwilioConfig

func UpdateGuardianTwilioConfig(body string) (gjson.Result, int, error)

UpdateGuardianTwilioConfig - update guardian twilio factor provider configuration

func UpdateResourceServer

func UpdateResourceServer(id string, body string) (gjson.Result, int, error)

UpdateResourceServer - update a resource server

func UpdateRule

func UpdateRule(id string, body string) (gjson.Result, int, error)

UpdateRule - update a rule

func UpdateTenantSettings

func UpdateTenantSettings(body string) (gjson.Result, int, error)

UpdateTenantSettings - update tenant settings

func UpdateUser

func UpdateUser(id string, body string) (gjson.Result, int, error)

UpdateUser - update a user

func UserInfo

func UserInfo(accessToken string) (gjson.Result, int, error)

UserInfo - get user info

func VerifyCustomDomain

func VerifyCustomDomain(id string) (gjson.Result, int, error)

VerifyCustomDomain - verify a custom domain

func VerifyEmail

func VerifyEmail(body string) (gjson.Result, int, error)

VerifyEmail - send a `verify email address` email

func VerifyOOB

func VerifyOOB(mfaToken string, oobCode string, bindingCode string) (gjson.Result, int, error)

VerifyOOB - verify OOB

func VerifyOTP

func VerifyOTP(mfaToken string, otpCode string) (gjson.Result, int, error)

VerifyOTP - verify OTP

func VerifyRecoveryCode

func VerifyRecoveryCode(mfaToken string, recoveryCode string) (gjson.Result, int, error)

VerifyRecoveryCode - verify recovery code

Types

This section is empty.

Jump to

Keyboard shortcuts

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