Documentation ¶
Index ¶
- func BeginReadTx(driver neo4j.Driver, configurers ...func(*neo4j.TransactionConfig)) (neo4j.Session, neo4j.Transaction, error)
- func BeginWriteTx(driver neo4j.Driver, configurers ...func(*neo4j.TransactionConfig)) (neo4j.Session, neo4j.Transaction, error)
- func CreateChallengeUsingOtp(tx neo4j.Transaction, challengeType ChallengeType, newChallenge Challenge) (challenge Challenge, otpCode ChallengeCode, err error)
- func CreatePassword(password string) (string, error)
- func Decrypt(str string, key string) (string, error)
- func EmitEventClientCreated(natsConnection *nats.Conn, client Client)
- func EmitEventHumanCreated(natsConnection *nats.Conn, human Human)
- func EmitEventHumanEmailChanged(natsConnection *nats.Conn, human Human)
- func EmitEventHumanPasswordChanged(natsConnection *nats.Conn, human Human)
- func EmitEventIdentityAuthenticated(natsConnection *nats.Conn, i Identity, acr string)
- func EmitEventInviteCreated(natsConnection *nats.Conn, invite Invite)
- func EmitEventInviteSent(natsConnection *nats.Conn, invite Invite)
- func EmitEventResourceServerCreated(natsConnection *nats.Conn, resourceServer ResourceServer)
- func Encrypt(str string, key string) (string, error)
- func GenerateRandomDigits(max int) (string, error)
- func SendEmail(smtpConfig SMTPConfig, name string, email string, subject string, body string) (bool, error)
- func SendEmailUsingTemplate(smtpConfig SMTPConfig, name string, email string, subject string, ...) (bool, error)
- func ValidateOtp(otp string, secret string) (bool, error)
- func ValidatePassword(storedPassword string, password string) (bool, error)
- type Challenge
- func CreateChallengeUsingTotp(tx neo4j.Transaction, challengeType ChallengeType, newChallenge Challenge) (challenge Challenge, err error)
- func FetchChallenges(tx neo4j.Transaction, iChallenges []Challenge) (challenges []Challenge, err error)
- func VerifyChallenge(tx neo4j.Transaction, challengeToUpdate Challenge) (updatedChallenge Challenge, err error)
- type ChallengeCode
- type ChallengeType
- type Client
- func CreateClient(tx neo4j.Transaction, managedBy *Identity, newClient Client) (client Client, err error)
- func DeleteClient(tx neo4j.Transaction, managedBy *Identity, clientToDelete Client) (client Client, err error)
- func FetchClients(tx neo4j.Transaction, managedBy *Identity, iClients []Client) (clients []Client, err error)
- type DeleteChallenge
- type Human
- func ConfirmEmail(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func CreateHuman(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func CreateHumanFromInvite(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func DeleteHuman(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func FetchHumans(tx neo4j.Transaction, iHumans []Human) (humans []Human, err error)
- func FetchHumansByEmail(tx neo4j.Transaction, iHumans []Human) (humans []Human, err error)
- func FetchHumansByUsername(tx neo4j.Transaction, iHumans []Human) (humans []Human, err error)
- func UpdateAllowLogin(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func UpdateEmail(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func UpdateHuman(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func UpdatePassword(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- func UpdateTotp(tx neo4j.Transaction, newHuman Human) (human Human, err error)
- type Identity
- type Invite
- func CreateInvite(tx neo4j.Transaction, invitedBy *Identity, newInvite Invite) (invite Invite, err error)
- func FetchInvites(tx neo4j.Transaction, invitedBy *Identity, iInvites []Invite) (invites []Invite, err error)
- func FetchInvitesByEmail(tx neo4j.Transaction, invitedBy *Identity, iInvites []Invite) (invites []Invite, err error)
- func FetchInvitesByUsername(tx neo4j.Transaction, invitedBy *Identity, iInvites []Invite) (invites []Invite, err error)
- func UpdateInviteSentAt(tx neo4j.Transaction, updatedBy *Identity, inviteToUpdate Invite) (invite Invite, err error)
- type JwtRegisteredClaims
- type RecoverChallenge
- type ResourceServer
- func CreateResourceServer(tx neo4j.Transaction, managedBy *Identity, newResourceServer ResourceServer) (resourceServer ResourceServer, err error)
- func DeleteResourceServer(tx neo4j.Transaction, managedBy *Identity, ...) (resourceServer ResourceServer, err error)
- func FetchResourceServers(tx neo4j.Transaction, managedBy *Identity, iResourceServers []ResourceServer) (resourceServers []ResourceServer, err error)
- type Role
- type SMTPConfig
- type SMTPSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginReadTx ¶
func BeginReadTx(driver neo4j.Driver, configurers ...func(*neo4j.TransactionConfig)) (neo4j.Session, neo4j.Transaction, error)
func BeginWriteTx ¶
func BeginWriteTx(driver neo4j.Driver, configurers ...func(*neo4j.TransactionConfig)) (neo4j.Session, neo4j.Transaction, error)
func CreateChallengeUsingOtp ¶
func CreateChallengeUsingOtp(tx neo4j.Transaction, challengeType ChallengeType, newChallenge Challenge) (challenge Challenge, otpCode ChallengeCode, err error)
func CreatePassword ¶
func EmitEventClientCreated ¶
func EmitEventHumanCreated ¶
func EmitEventInviteCreated ¶
func EmitEventInviteSent ¶
func EmitEventResourceServerCreated ¶
func EmitEventResourceServerCreated(natsConnection *nats.Conn, resourceServer ResourceServer)
func GenerateRandomDigits ¶
func SendEmailUsingTemplate ¶
Types ¶
type Challenge ¶
type Challenge struct { Id string ChallengeType ChallengeType JwtRegisteredClaims RedirectTo string CodeType int64 Code string VerifiedAt int64 Data string }
func CreateChallengeUsingTotp ¶
func CreateChallengeUsingTotp(tx neo4j.Transaction, challengeType ChallengeType, newChallenge Challenge) (challenge Challenge, err error)
func FetchChallenges ¶
func FetchChallenges(tx neo4j.Transaction, iChallenges []Challenge) (challenges []Challenge, err error)
func VerifyChallenge ¶
func VerifyChallenge(tx neo4j.Transaction, challengeToUpdate Challenge) (updatedChallenge Challenge, err error)
type ChallengeCode ¶
type ChallengeCode struct {
Code string
}
func CreateChallengeCode ¶
func CreateChallengeCode() (ChallengeCode, error)
type ChallengeType ¶
type ChallengeType int
const ( ChallengeNotSupported ChallengeType = iota + 0 // Start a 0 ChallengeAuthenticate ChallengeRecover ChallengeDelete ChallengeEmailConfirm ChallengeEmailChange )
func (ChallengeType) String ¶
func (d ChallengeType) String() string
type Client ¶
type Client struct { Identity Secret string Name string Description string GrantTypes []string Audiences []string ResponseTypes []string RedirectUris []string PostLogoutRedirectUris []string TokenEndpointAuthMethod string }
func CreateClient ¶
func DeleteClient ¶
func FetchClients ¶
type DeleteChallenge ¶
func CreateDeleteChallenge ¶
func CreateDeleteChallenge(url string, identity Human, challengeTimeoutInSeconds int64) (DeleteChallenge, error)
type Human ¶
type Human struct { Identity // Identity.Id aliasses Email string EmailConfirmedAt int64 Username string Name string AllowLogin bool Password string TotpRequired bool TotpSecret string }
func ConfirmEmail ¶
func ConfirmEmail(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func CreateHuman ¶
func CreateHuman(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func CreateHumanFromInvite ¶
func CreateHumanFromInvite(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func DeleteHuman ¶
func DeleteHuman(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func FetchHumans ¶
func FetchHumans(tx neo4j.Transaction, iHumans []Human) (humans []Human, err error)
func FetchHumansByEmail ¶
func FetchHumansByEmail(tx neo4j.Transaction, iHumans []Human) (humans []Human, err error)
func FetchHumansByUsername ¶
func FetchHumansByUsername(tx neo4j.Transaction, iHumans []Human) (humans []Human, err error)
func UpdateAllowLogin ¶
func UpdateAllowLogin(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func UpdateEmail ¶
func UpdateEmail(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func UpdateHuman ¶
func UpdateHuman(tx neo4j.Transaction, newHuman Human) (human Human, err error)
NOTE: This can update everything that is _NOT_ sensitive to the authentication process like Identity.Password
To change the password see recover for that or iff identified UpdatePassword
func UpdatePassword ¶
func UpdatePassword(tx neo4j.Transaction, newHuman Human) (human Human, err error)
func UpdateTotp ¶
func UpdateTotp(tx neo4j.Transaction, newHuman Human) (human Human, err error)
type Identity ¶
type Identity struct { Id string Labels string // JWT // Subject string // Renamed it to Identity.Id Issuer string ExpiresAt int64 IssuedAt int64 OtpDeleteCode string OtpDeleteCodeExpire int64 CreatedBy *Identity }
func FetchIdentities ¶
func FetchIdentities(tx neo4j.Transaction, iIdentities []Identity) (identities []Identity, err error)
func SearchIdentities ¶
func SearchIdentities(tx neo4j.Transaction, iSearch string) (identities []Identity, err error)
type Invite ¶
func CreateInvite ¶
func FetchInvites ¶
func FetchInvitesByEmail ¶
func FetchInvitesByUsername ¶
func UpdateInviteSentAt ¶
type JwtRegisteredClaims ¶
type RecoverChallenge ¶
func CreateRecoverChallenge ¶
func CreateRecoverChallenge(url string, identity Human, challengeTimeoutInSeconds int64) (RecoverChallenge, error)
type ResourceServer ¶
func CreateResourceServer ¶
func CreateResourceServer(tx neo4j.Transaction, managedBy *Identity, newResourceServer ResourceServer) (resourceServer ResourceServer, err error)
func DeleteResourceServer ¶
func DeleteResourceServer(tx neo4j.Transaction, managedBy *Identity, resourceServerToDelete ResourceServer) (resourceServer ResourceServer, err error)
func FetchResourceServers ¶
func FetchResourceServers(tx neo4j.Transaction, managedBy *Identity, iResourceServers []ResourceServer) (resourceServers []ResourceServer, err error)
type SMTPConfig ¶
type SMTPConfig struct { Host string Username string Password string Sender SMTPSender SkipTlsVerify int }
type SMTPSender ¶
Click to show internal directories.
Click to hide internal directories.