Merge pull request #403 from authorizerdev/fix/upgrade-packages
fix: upgrade packages
This commit is contained in:
commit
734e54db69
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.21.1-alpine as go-builder
|
||||
FROM golang:1.21.3-alpine3.18 as go-builder
|
||||
WORKDIR /authorizer
|
||||
COPY server server
|
||||
COPY Makefile .
|
||||
|
@ -11,7 +11,7 @@ RUN apk add build-base &&\
|
|||
make clean && make && \
|
||||
chmod 777 build/server
|
||||
|
||||
FROM node:17-alpine3.12 as node-builder
|
||||
FROM node:20-alpine3.18 as node-builder
|
||||
WORKDIR /authorizer
|
||||
COPY app app
|
||||
COPY dashboard dashboard
|
||||
|
@ -20,7 +20,7 @@ RUN apk add build-base &&\
|
|||
make build-app && \
|
||||
make build-dashboard
|
||||
|
||||
FROM alpine:latest
|
||||
FROM alpine:3.18
|
||||
RUN adduser -D -h /authorizer -u 1000 -k /dev/null authorizer
|
||||
WORKDIR /authorizer
|
||||
RUN mkdir app dashboard
|
||||
|
|
12
dashboard/package-lock.json
generated
12
dashboard/package-lock.json
generated
|
@ -2847,9 +2847,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
|
@ -5167,9 +5167,9 @@
|
|||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"peer": true
|
||||
},
|
||||
"setimmediate": {
|
||||
|
|
|
@ -1740,9 +1740,9 @@ scheduler@^0.20.2:
|
|||
object-assign "^4.1.1"
|
||||
|
||||
semver@^6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
version "6.3.1"
|
||||
resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz"
|
||||
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
|
||||
|
||||
setimmediate@^1.0.5:
|
||||
version "1.0.5"
|
||||
|
|
|
@ -261,6 +261,13 @@ func NewProvider() (*provider, error) {
|
|||
log.Debug("Failed to alter table as column exists: ", err)
|
||||
// continue
|
||||
}
|
||||
// Add app_data column to users table
|
||||
appDataAlterQuery := fmt.Sprintf(`ALTER TABLE %s.%s ADD (app_data text);`, KeySpace, models.Collections.User)
|
||||
err = session.Query(appDataAlterQuery).Exec()
|
||||
if err != nil {
|
||||
log.Debug("Failed to alter user table as app_data column exists: ", err)
|
||||
// continue
|
||||
}
|
||||
// Add phone number index
|
||||
otpIndexQueryPhoneNumber := fmt.Sprintf("CREATE INDEX IF NOT EXISTS authorizer_otp_phone_number ON %s.%s (phone_number)", KeySpace, models.Collections.OTP)
|
||||
err = session.Query(otpIndexQueryPhoneNumber).Exec()
|
||||
|
|
|
@ -177,13 +177,13 @@ func (p *provider) ListUsers(ctx context.Context, pagination *model.Pagination)
|
|||
// there is no offset in cassandra
|
||||
// so we fetch till limit + offset
|
||||
// and return the results from offset to limit
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, created_at, updated_at FROM %s LIMIT %d", KeySpace+"."+models.Collections.User, pagination.Limit+pagination.Offset)
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, app_data, created_at, updated_at FROM %s LIMIT %d", KeySpace+"."+models.Collections.User, pagination.Limit+pagination.Offset)
|
||||
scanner := p.db.Query(query).Iter().Scanner()
|
||||
counter := int64(0)
|
||||
for scanner.Next() {
|
||||
if counter >= pagination.Offset {
|
||||
var user models.User
|
||||
err := scanner.Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.CreatedAt, &user.UpdatedAt)
|
||||
err := scanner.Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.AppData, &user.CreatedAt, &user.UpdatedAt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -200,8 +200,8 @@ func (p *provider) ListUsers(ctx context.Context, pagination *model.Pagination)
|
|||
// GetUserByEmail to get user information from database using email address
|
||||
func (p *provider) GetUserByEmail(ctx context.Context, email string) (*models.User, error) {
|
||||
var user models.User
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, created_at, updated_at FROM %s WHERE email = '%s' LIMIT 1 ALLOW FILTERING", KeySpace+"."+models.Collections.User, email)
|
||||
err := p.db.Query(query).Consistency(gocql.One).Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.CreatedAt, &user.UpdatedAt)
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, app_data, created_at, updated_at FROM %s WHERE email = '%s' LIMIT 1 ALLOW FILTERING", KeySpace+"."+models.Collections.User, email)
|
||||
err := p.db.Query(query).Consistency(gocql.One).Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.AppData, &user.CreatedAt, &user.UpdatedAt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -211,8 +211,8 @@ func (p *provider) GetUserByEmail(ctx context.Context, email string) (*models.Us
|
|||
// GetUserByID to get user information from database using user ID
|
||||
func (p *provider) GetUserByID(ctx context.Context, id string) (*models.User, error) {
|
||||
var user models.User
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, created_at, updated_at FROM %s WHERE id = '%s' LIMIT 1", KeySpace+"."+models.Collections.User, id)
|
||||
err := p.db.Query(query).Consistency(gocql.One).Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.CreatedAt, &user.UpdatedAt)
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, app_data, created_at, updated_at FROM %s WHERE id = '%s' LIMIT 1", KeySpace+"."+models.Collections.User, id)
|
||||
err := p.db.Query(query).Consistency(gocql.One).Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.AppData, &user.CreatedAt, &user.UpdatedAt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -306,8 +306,8 @@ func (p *provider) UpdateUsers(ctx context.Context, data map[string]interface{},
|
|||
// GetUserByPhoneNumber to get user information from database using phone number
|
||||
func (p *provider) GetUserByPhoneNumber(ctx context.Context, phoneNumber string) (*models.User, error) {
|
||||
var user models.User
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, created_at, updated_at FROM %s WHERE phone_number = '%s' LIMIT 1 ALLOW FILTERING", KeySpace+"."+models.Collections.User, phoneNumber)
|
||||
err := p.db.Query(query).Consistency(gocql.One).Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.CreatedAt, &user.UpdatedAt)
|
||||
query := fmt.Sprintf("SELECT id, email, email_verified_at, password, signup_methods, given_name, family_name, middle_name, nickname, birthdate, phone_number, phone_number_verified_at, picture, roles, revoked_timestamp, is_multi_factor_auth_enabled, app_data, created_at, updated_at FROM %s WHERE phone_number = '%s' LIMIT 1 ALLOW FILTERING", KeySpace+"."+models.Collections.User, phoneNumber)
|
||||
err := p.db.Query(query).Consistency(gocql.One).Scan(&user.ID, &user.Email, &user.EmailVerifiedAt, &user.Password, &user.SignupMethods, &user.GivenName, &user.FamilyName, &user.MiddleName, &user.Nickname, &user.Birthdate, &user.PhoneNumber, &user.PhoneNumberVerifiedAt, &user.Picture, &user.Roles, &user.RevokedTimestamp, &user.IsMultiFactorAuthEnabled, &user.AppData, &user.CreatedAt, &user.UpdatedAt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ func SendEmail(to []string, event string, data map[string]interface{}) error {
|
|||
|
||||
tmp, err := getEmailTemplate(event, data)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get event template: ", err)
|
||||
log.Error("Failed to get event template: ", err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -3,40 +3,51 @@ module github.com/authorizerdev/authorizer/server
|
|||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/99designs/gqlgen v0.17.20
|
||||
github.com/arangodb/go-driver v1.2.1
|
||||
github.com/aws/aws-sdk-go v1.44.298
|
||||
github.com/coreos/go-oidc/v3 v3.1.0
|
||||
github.com/couchbase/gocb/v2 v2.6.0
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/glebarez/sqlite v1.5.0
|
||||
github.com/go-playground/validator/v10 v10.11.1 // indirect
|
||||
github.com/goccy/go-json v0.9.11 // indirect
|
||||
github.com/gocql/gocql v1.2.0
|
||||
github.com/99designs/gqlgen v0.17.39
|
||||
github.com/arangodb/go-driver v1.6.0
|
||||
github.com/aws/aws-sdk-go v1.45.25
|
||||
github.com/bytedance/sonic v1.10.2 // indirect
|
||||
github.com/coreos/go-oidc/v3 v3.6.0
|
||||
github.com/couchbase/gocb/v2 v2.6.4
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/glebarez/sqlite v1.9.0
|
||||
github.com/go-playground/validator/v10 v10.15.5 // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.1 // indirect
|
||||
github.com/gocql/gocql v1.6.0
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/go-cmp v0.5.6 // indirect
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/guregu/dynamo v1.20.0
|
||||
github.com/joho/godotenv v1.3.0
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||
github.com/redis/go-redis/v9 v9.0.3
|
||||
github.com/robertkrimen/otto v0.0.0-20211024170158-b87d35c0b86f
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/twilio/twilio-go v1.7.2
|
||||
github.com/vektah/gqlparser/v2 v2.5.1
|
||||
go.mongodb.org/mongo-driver v1.8.1
|
||||
golang.org/x/crypto v0.4.0
|
||||
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
|
||||
google.golang.org/appengine v1.6.7
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
github.com/google/uuid v1.3.1
|
||||
github.com/guregu/dynamo v1.20.2
|
||||
github.com/hashicorp/golang-lru v1.0.2 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/klauspost/compress v1.17.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||
github.com/montanaflynn/stats v0.7.1 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/redis/go-redis/v9 v9.2.1
|
||||
github.com/robertkrimen/otto v0.2.1
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/sosodev/duration v1.2.0 // indirect
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/twilio/twilio-go v1.14.1
|
||||
github.com/urfave/cli/v2 v2.25.7 // indirect
|
||||
github.com/vektah/gqlparser/v2 v2.5.10
|
||||
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
|
||||
go.mongodb.org/mongo-driver v1.12.1
|
||||
golang.org/x/arch v0.5.0 // indirect
|
||||
golang.org/x/crypto v0.14.0
|
||||
golang.org/x/oauth2 v0.13.0
|
||||
golang.org/x/tools v0.14.0 // indirect
|
||||
google.golang.org/appengine v1.6.8
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/mail.v2 v2.3.1
|
||||
gopkg.in/square/go-jose.v2 v2.6.0
|
||||
gorm.io/driver/mysql v1.4.3
|
||||
gorm.io/driver/postgres v1.4.7
|
||||
gorm.io/driver/sqlserver v1.4.1
|
||||
gorm.io/gorm v1.24.2
|
||||
gorm.io/driver/mysql v1.5.2
|
||||
gorm.io/driver/postgres v1.5.3
|
||||
gorm.io/driver/sqlserver v1.5.2
|
||||
gorm.io/gorm v1.25.5
|
||||
modernc.org/memory v1.7.2 // indirect
|
||||
modernc.org/sqlite v1.26.0 // indirect
|
||||
)
|
||||
|
|
1518
server/go.sum
1518
server/go.sum
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -6,15 +6,15 @@ type AddEmailTemplateRequest struct {
|
|||
EventName string `json:"event_name"`
|
||||
Subject string `json:"subject"`
|
||||
Template string `json:"template"`
|
||||
Design *string `json:"design"`
|
||||
Design *string `json:"design,omitempty"`
|
||||
}
|
||||
|
||||
type AddWebhookRequest struct {
|
||||
EventName string `json:"event_name"`
|
||||
EventDescription *string `json:"event_description"`
|
||||
EventDescription *string `json:"event_description,omitempty"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Headers map[string]interface{} `json:"headers"`
|
||||
Headers map[string]interface{} `json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
type AdminLoginInput struct {
|
||||
|
@ -27,13 +27,13 @@ type AdminSignupInput struct {
|
|||
|
||||
type AuthResponse struct {
|
||||
Message string `json:"message"`
|
||||
ShouldShowEmailOtpScreen *bool `json:"should_show_email_otp_screen"`
|
||||
ShouldShowMobileOtpScreen *bool `json:"should_show_mobile_otp_screen"`
|
||||
AccessToken *string `json:"access_token"`
|
||||
IDToken *string `json:"id_token"`
|
||||
RefreshToken *string `json:"refresh_token"`
|
||||
ExpiresIn *int64 `json:"expires_in"`
|
||||
User *User `json:"user"`
|
||||
ShouldShowEmailOtpScreen *bool `json:"should_show_email_otp_screen,omitempty"`
|
||||
ShouldShowMobileOtpScreen *bool `json:"should_show_mobile_otp_screen,omitempty"`
|
||||
AccessToken *string `json:"access_token,omitempty"`
|
||||
IDToken *string `json:"id_token,omitempty"`
|
||||
RefreshToken *string `json:"refresh_token,omitempty"`
|
||||
ExpiresIn *int64 `json:"expires_in,omitempty"`
|
||||
User *User `json:"user,omitempty"`
|
||||
}
|
||||
|
||||
type DeleteEmailTemplateRequest struct {
|
||||
|
@ -50,8 +50,8 @@ type EmailTemplate struct {
|
|||
Template string `json:"template"`
|
||||
Design string `json:"design"`
|
||||
Subject string `json:"subject"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
CreatedAt *int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt *int64 `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type EmailTemplates struct {
|
||||
|
@ -60,33 +60,33 @@ type EmailTemplates struct {
|
|||
}
|
||||
|
||||
type Env struct {
|
||||
AccessTokenExpiryTime *string `json:"ACCESS_TOKEN_EXPIRY_TIME"`
|
||||
AdminSecret *string `json:"ADMIN_SECRET"`
|
||||
DatabaseName *string `json:"DATABASE_NAME"`
|
||||
DatabaseURL *string `json:"DATABASE_URL"`
|
||||
DatabaseType *string `json:"DATABASE_TYPE"`
|
||||
DatabaseUsername *string `json:"DATABASE_USERNAME"`
|
||||
DatabasePassword *string `json:"DATABASE_PASSWORD"`
|
||||
DatabaseHost *string `json:"DATABASE_HOST"`
|
||||
DatabasePort *string `json:"DATABASE_PORT"`
|
||||
AccessTokenExpiryTime *string `json:"ACCESS_TOKEN_EXPIRY_TIME,omitempty"`
|
||||
AdminSecret *string `json:"ADMIN_SECRET,omitempty"`
|
||||
DatabaseName *string `json:"DATABASE_NAME,omitempty"`
|
||||
DatabaseURL *string `json:"DATABASE_URL,omitempty"`
|
||||
DatabaseType *string `json:"DATABASE_TYPE,omitempty"`
|
||||
DatabaseUsername *string `json:"DATABASE_USERNAME,omitempty"`
|
||||
DatabasePassword *string `json:"DATABASE_PASSWORD,omitempty"`
|
||||
DatabaseHost *string `json:"DATABASE_HOST,omitempty"`
|
||||
DatabasePort *string `json:"DATABASE_PORT,omitempty"`
|
||||
ClientID string `json:"CLIENT_ID"`
|
||||
ClientSecret string `json:"CLIENT_SECRET"`
|
||||
CustomAccessTokenScript *string `json:"CUSTOM_ACCESS_TOKEN_SCRIPT"`
|
||||
SMTPHost *string `json:"SMTP_HOST"`
|
||||
SMTPPort *string `json:"SMTP_PORT"`
|
||||
SMTPUsername *string `json:"SMTP_USERNAME"`
|
||||
SMTPPassword *string `json:"SMTP_PASSWORD"`
|
||||
SMTPLocalName *string `json:"SMTP_LOCAL_NAME"`
|
||||
SenderEmail *string `json:"SENDER_EMAIL"`
|
||||
SenderName *string `json:"SENDER_NAME"`
|
||||
JwtType *string `json:"JWT_TYPE"`
|
||||
JwtSecret *string `json:"JWT_SECRET"`
|
||||
JwtPrivateKey *string `json:"JWT_PRIVATE_KEY"`
|
||||
JwtPublicKey *string `json:"JWT_PUBLIC_KEY"`
|
||||
AllowedOrigins []string `json:"ALLOWED_ORIGINS"`
|
||||
AppURL *string `json:"APP_URL"`
|
||||
RedisURL *string `json:"REDIS_URL"`
|
||||
ResetPasswordURL *string `json:"RESET_PASSWORD_URL"`
|
||||
CustomAccessTokenScript *string `json:"CUSTOM_ACCESS_TOKEN_SCRIPT,omitempty"`
|
||||
SMTPHost *string `json:"SMTP_HOST,omitempty"`
|
||||
SMTPPort *string `json:"SMTP_PORT,omitempty"`
|
||||
SMTPUsername *string `json:"SMTP_USERNAME,omitempty"`
|
||||
SMTPPassword *string `json:"SMTP_PASSWORD,omitempty"`
|
||||
SMTPLocalName *string `json:"SMTP_LOCAL_NAME,omitempty"`
|
||||
SenderEmail *string `json:"SENDER_EMAIL,omitempty"`
|
||||
SenderName *string `json:"SENDER_NAME,omitempty"`
|
||||
JwtType *string `json:"JWT_TYPE,omitempty"`
|
||||
JwtSecret *string `json:"JWT_SECRET,omitempty"`
|
||||
JwtPrivateKey *string `json:"JWT_PRIVATE_KEY,omitempty"`
|
||||
JwtPublicKey *string `json:"JWT_PUBLIC_KEY,omitempty"`
|
||||
AllowedOrigins []string `json:"ALLOWED_ORIGINS,omitempty"`
|
||||
AppURL *string `json:"APP_URL,omitempty"`
|
||||
RedisURL *string `json:"REDIS_URL,omitempty"`
|
||||
ResetPasswordURL *string `json:"RESET_PASSWORD_URL,omitempty"`
|
||||
DisableEmailVerification bool `json:"DISABLE_EMAIL_VERIFICATION"`
|
||||
DisableBasicAuthentication bool `json:"DISABLE_BASIC_AUTHENTICATION"`
|
||||
DisableMagicLinkLogin bool `json:"DISABLE_MAGIC_LINK_LOGIN"`
|
||||
|
@ -96,31 +96,31 @@ type Env struct {
|
|||
DisableStrongPassword bool `json:"DISABLE_STRONG_PASSWORD"`
|
||||
DisableMultiFactorAuthentication bool `json:"DISABLE_MULTI_FACTOR_AUTHENTICATION"`
|
||||
EnforceMultiFactorAuthentication bool `json:"ENFORCE_MULTI_FACTOR_AUTHENTICATION"`
|
||||
Roles []string `json:"ROLES"`
|
||||
ProtectedRoles []string `json:"PROTECTED_ROLES"`
|
||||
DefaultRoles []string `json:"DEFAULT_ROLES"`
|
||||
JwtRoleClaim *string `json:"JWT_ROLE_CLAIM"`
|
||||
GoogleClientID *string `json:"GOOGLE_CLIENT_ID"`
|
||||
GoogleClientSecret *string `json:"GOOGLE_CLIENT_SECRET"`
|
||||
GithubClientID *string `json:"GITHUB_CLIENT_ID"`
|
||||
GithubClientSecret *string `json:"GITHUB_CLIENT_SECRET"`
|
||||
FacebookClientID *string `json:"FACEBOOK_CLIENT_ID"`
|
||||
FacebookClientSecret *string `json:"FACEBOOK_CLIENT_SECRET"`
|
||||
LinkedinClientID *string `json:"LINKEDIN_CLIENT_ID"`
|
||||
LinkedinClientSecret *string `json:"LINKEDIN_CLIENT_SECRET"`
|
||||
AppleClientID *string `json:"APPLE_CLIENT_ID"`
|
||||
AppleClientSecret *string `json:"APPLE_CLIENT_SECRET"`
|
||||
TwitterClientID *string `json:"TWITTER_CLIENT_ID"`
|
||||
TwitterClientSecret *string `json:"TWITTER_CLIENT_SECRET"`
|
||||
MicrosoftClientID *string `json:"MICROSOFT_CLIENT_ID"`
|
||||
MicrosoftClientSecret *string `json:"MICROSOFT_CLIENT_SECRET"`
|
||||
MicrosoftActiveDirectoryTenantID *string `json:"MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID"`
|
||||
OrganizationName *string `json:"ORGANIZATION_NAME"`
|
||||
OrganizationLogo *string `json:"ORGANIZATION_LOGO"`
|
||||
Roles []string `json:"ROLES,omitempty"`
|
||||
ProtectedRoles []string `json:"PROTECTED_ROLES,omitempty"`
|
||||
DefaultRoles []string `json:"DEFAULT_ROLES,omitempty"`
|
||||
JwtRoleClaim *string `json:"JWT_ROLE_CLAIM,omitempty"`
|
||||
GoogleClientID *string `json:"GOOGLE_CLIENT_ID,omitempty"`
|
||||
GoogleClientSecret *string `json:"GOOGLE_CLIENT_SECRET,omitempty"`
|
||||
GithubClientID *string `json:"GITHUB_CLIENT_ID,omitempty"`
|
||||
GithubClientSecret *string `json:"GITHUB_CLIENT_SECRET,omitempty"`
|
||||
FacebookClientID *string `json:"FACEBOOK_CLIENT_ID,omitempty"`
|
||||
FacebookClientSecret *string `json:"FACEBOOK_CLIENT_SECRET,omitempty"`
|
||||
LinkedinClientID *string `json:"LINKEDIN_CLIENT_ID,omitempty"`
|
||||
LinkedinClientSecret *string `json:"LINKEDIN_CLIENT_SECRET,omitempty"`
|
||||
AppleClientID *string `json:"APPLE_CLIENT_ID,omitempty"`
|
||||
AppleClientSecret *string `json:"APPLE_CLIENT_SECRET,omitempty"`
|
||||
TwitterClientID *string `json:"TWITTER_CLIENT_ID,omitempty"`
|
||||
TwitterClientSecret *string `json:"TWITTER_CLIENT_SECRET,omitempty"`
|
||||
MicrosoftClientID *string `json:"MICROSOFT_CLIENT_ID,omitempty"`
|
||||
MicrosoftClientSecret *string `json:"MICROSOFT_CLIENT_SECRET,omitempty"`
|
||||
MicrosoftActiveDirectoryTenantID *string `json:"MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID,omitempty"`
|
||||
OrganizationName *string `json:"ORGANIZATION_NAME,omitempty"`
|
||||
OrganizationLogo *string `json:"ORGANIZATION_LOGO,omitempty"`
|
||||
AppCookieSecure bool `json:"APP_COOKIE_SECURE"`
|
||||
AdminCookieSecure bool `json:"ADMIN_COOKIE_SECURE"`
|
||||
DefaultAuthorizeResponseType *string `json:"DEFAULT_AUTHORIZE_RESPONSE_TYPE"`
|
||||
DefaultAuthorizeResponseMode *string `json:"DEFAULT_AUTHORIZE_RESPONSE_MODE"`
|
||||
DefaultAuthorizeResponseType *string `json:"DEFAULT_AUTHORIZE_RESPONSE_TYPE,omitempty"`
|
||||
DefaultAuthorizeResponseMode *string `json:"DEFAULT_AUTHORIZE_RESPONSE_MODE,omitempty"`
|
||||
DisablePlayground bool `json:"DISABLE_PLAYGROUND"`
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,8 @@ type Error struct {
|
|||
|
||||
type ForgotPasswordInput struct {
|
||||
Email string `json:"email"`
|
||||
State *string `json:"state"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
State *string `json:"state,omitempty"`
|
||||
RedirectURI *string `json:"redirect_uri,omitempty"`
|
||||
}
|
||||
|
||||
type GenerateJWTKeysInput struct {
|
||||
|
@ -140,19 +140,19 @@ type GenerateJWTKeysInput struct {
|
|||
}
|
||||
|
||||
type GenerateJWTKeysResponse struct {
|
||||
Secret *string `json:"secret"`
|
||||
PublicKey *string `json:"public_key"`
|
||||
PrivateKey *string `json:"private_key"`
|
||||
Secret *string `json:"secret,omitempty"`
|
||||
PublicKey *string `json:"public_key,omitempty"`
|
||||
PrivateKey *string `json:"private_key,omitempty"`
|
||||
}
|
||||
|
||||
type GetUserRequest struct {
|
||||
ID *string `json:"id"`
|
||||
Email *string `json:"email"`
|
||||
ID *string `json:"id,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
}
|
||||
|
||||
type InviteMemberInput struct {
|
||||
Emails []string `json:"emails"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
RedirectURI *string `json:"redirect_uri,omitempty"`
|
||||
}
|
||||
|
||||
type InviteMembersResponse struct {
|
||||
|
@ -161,24 +161,24 @@ type InviteMembersResponse struct {
|
|||
}
|
||||
|
||||
type ListWebhookLogRequest struct {
|
||||
Pagination *PaginationInput `json:"pagination"`
|
||||
WebhookID *string `json:"webhook_id"`
|
||||
Pagination *PaginationInput `json:"pagination,omitempty"`
|
||||
WebhookID *string `json:"webhook_id,omitempty"`
|
||||
}
|
||||
|
||||
type LoginInput struct {
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
State *string `json:"state"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Scope []string `json:"scope,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type MagicLinkLoginInput struct {
|
||||
Email string `json:"email"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
State *string `json:"state"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Scope []string `json:"scope,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
RedirectURI *string `json:"redirect_uri,omitempty"`
|
||||
}
|
||||
|
||||
type Meta struct {
|
||||
|
@ -202,29 +202,29 @@ type Meta struct {
|
|||
type MobileLoginInput struct {
|
||||
PhoneNumber string `json:"phone_number"`
|
||||
Password string `json:"password"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
State *string `json:"state"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Scope []string `json:"scope,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type MobileSignUpInput struct {
|
||||
Email *string `json:"email"`
|
||||
GivenName *string `json:"given_name"`
|
||||
FamilyName *string `json:"family_name"`
|
||||
MiddleName *string `json:"middle_name"`
|
||||
Nickname *string `json:"nickname"`
|
||||
Gender *string `json:"gender"`
|
||||
Birthdate *string `json:"birthdate"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
GivenName *string `json:"given_name,omitempty"`
|
||||
FamilyName *string `json:"family_name,omitempty"`
|
||||
MiddleName *string `json:"middle_name,omitempty"`
|
||||
Nickname *string `json:"nickname,omitempty"`
|
||||
Gender *string `json:"gender,omitempty"`
|
||||
Birthdate *string `json:"birthdate,omitempty"`
|
||||
PhoneNumber string `json:"phone_number"`
|
||||
Picture *string `json:"picture"`
|
||||
Picture *string `json:"picture,omitempty"`
|
||||
Password string `json:"password"`
|
||||
ConfirmPassword string `json:"confirm_password"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled"`
|
||||
State *string `json:"state"`
|
||||
AppData map[string]interface{} `json:"app_data"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Scope []string `json:"scope,omitempty"`
|
||||
RedirectURI *string `json:"redirect_uri,omitempty"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
AppData map[string]interface{} `json:"app_data,omitempty"`
|
||||
}
|
||||
|
||||
type OAuthRevokeInput struct {
|
||||
|
@ -232,7 +232,7 @@ type OAuthRevokeInput struct {
|
|||
}
|
||||
|
||||
type PaginatedInput struct {
|
||||
Pagination *PaginationInput `json:"pagination"`
|
||||
Pagination *PaginationInput `json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
type Pagination struct {
|
||||
|
@ -243,20 +243,20 @@ type Pagination struct {
|
|||
}
|
||||
|
||||
type PaginationInput struct {
|
||||
Limit *int64 `json:"limit"`
|
||||
Page *int64 `json:"page"`
|
||||
Limit *int64 `json:"limit,omitempty"`
|
||||
Page *int64 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
type ResendOTPRequest struct {
|
||||
Email *string `json:"email"`
|
||||
PhoneNumber *string `json:"phone_number"`
|
||||
State *string `json:"state"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
PhoneNumber *string `json:"phone_number,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type ResendVerifyEmailInput struct {
|
||||
Email string `json:"email"`
|
||||
Identifier string `json:"identifier"`
|
||||
State *string `json:"state"`
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type ResetPasswordInput struct {
|
||||
|
@ -275,44 +275,44 @@ type SMSVerificationRequests struct {
|
|||
CodeExpiresAt int64 `json:"code_expires_at"`
|
||||
PhoneNumber string `json:"phone_number"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
UpdatedAt *int64 `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type SessionQueryInput struct {
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Scope []string `json:"scope,omitempty"`
|
||||
}
|
||||
|
||||
type SignUpInput struct {
|
||||
Email string `json:"email"`
|
||||
GivenName *string `json:"given_name"`
|
||||
FamilyName *string `json:"family_name"`
|
||||
MiddleName *string `json:"middle_name"`
|
||||
Nickname *string `json:"nickname"`
|
||||
Gender *string `json:"gender"`
|
||||
Birthdate *string `json:"birthdate"`
|
||||
PhoneNumber *string `json:"phone_number"`
|
||||
Picture *string `json:"picture"`
|
||||
GivenName *string `json:"given_name,omitempty"`
|
||||
FamilyName *string `json:"family_name,omitempty"`
|
||||
MiddleName *string `json:"middle_name,omitempty"`
|
||||
Nickname *string `json:"nickname,omitempty"`
|
||||
Gender *string `json:"gender,omitempty"`
|
||||
Birthdate *string `json:"birthdate,omitempty"`
|
||||
PhoneNumber *string `json:"phone_number,omitempty"`
|
||||
Picture *string `json:"picture,omitempty"`
|
||||
Password string `json:"password"`
|
||||
ConfirmPassword string `json:"confirm_password"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled"`
|
||||
State *string `json:"state"`
|
||||
AppData map[string]interface{} `json:"app_data"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
Scope []string `json:"scope,omitempty"`
|
||||
RedirectURI *string `json:"redirect_uri,omitempty"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled,omitempty"`
|
||||
State *string `json:"state,omitempty"`
|
||||
AppData map[string]interface{} `json:"app_data,omitempty"`
|
||||
}
|
||||
|
||||
type TestEndpointRequest struct {
|
||||
Endpoint string `json:"endpoint"`
|
||||
EventName string `json:"event_name"`
|
||||
EventDescription *string `json:"event_description"`
|
||||
Headers map[string]interface{} `json:"headers"`
|
||||
EventDescription *string `json:"event_description,omitempty"`
|
||||
Headers map[string]interface{} `json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
type TestEndpointResponse struct {
|
||||
HTTPStatus *int64 `json:"http_status"`
|
||||
Response *string `json:"response"`
|
||||
HTTPStatus *int64 `json:"http_status,omitempty"`
|
||||
Response *string `json:"response,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateAccessInput struct {
|
||||
|
@ -321,109 +321,109 @@ type UpdateAccessInput struct {
|
|||
|
||||
type UpdateEmailTemplateRequest struct {
|
||||
ID string `json:"id"`
|
||||
EventName *string `json:"event_name"`
|
||||
Template *string `json:"template"`
|
||||
Subject *string `json:"subject"`
|
||||
Design *string `json:"design"`
|
||||
EventName *string `json:"event_name,omitempty"`
|
||||
Template *string `json:"template,omitempty"`
|
||||
Subject *string `json:"subject,omitempty"`
|
||||
Design *string `json:"design,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateEnvInput struct {
|
||||
AccessTokenExpiryTime *string `json:"ACCESS_TOKEN_EXPIRY_TIME"`
|
||||
AdminSecret *string `json:"ADMIN_SECRET"`
|
||||
CustomAccessTokenScript *string `json:"CUSTOM_ACCESS_TOKEN_SCRIPT"`
|
||||
OldAdminSecret *string `json:"OLD_ADMIN_SECRET"`
|
||||
SMTPHost *string `json:"SMTP_HOST"`
|
||||
SMTPPort *string `json:"SMTP_PORT"`
|
||||
SMTPUsername *string `json:"SMTP_USERNAME"`
|
||||
SMTPPassword *string `json:"SMTP_PASSWORD"`
|
||||
SMTPLocalName *string `json:"SMTP_LOCAL_NAME"`
|
||||
SenderEmail *string `json:"SENDER_EMAIL"`
|
||||
SenderName *string `json:"SENDER_NAME"`
|
||||
JwtType *string `json:"JWT_TYPE"`
|
||||
JwtSecret *string `json:"JWT_SECRET"`
|
||||
JwtPrivateKey *string `json:"JWT_PRIVATE_KEY"`
|
||||
JwtPublicKey *string `json:"JWT_PUBLIC_KEY"`
|
||||
AllowedOrigins []string `json:"ALLOWED_ORIGINS"`
|
||||
AppURL *string `json:"APP_URL"`
|
||||
ResetPasswordURL *string `json:"RESET_PASSWORD_URL"`
|
||||
AppCookieSecure *bool `json:"APP_COOKIE_SECURE"`
|
||||
AdminCookieSecure *bool `json:"ADMIN_COOKIE_SECURE"`
|
||||
DisableEmailVerification *bool `json:"DISABLE_EMAIL_VERIFICATION"`
|
||||
DisableBasicAuthentication *bool `json:"DISABLE_BASIC_AUTHENTICATION"`
|
||||
DisableMagicLinkLogin *bool `json:"DISABLE_MAGIC_LINK_LOGIN"`
|
||||
DisableLoginPage *bool `json:"DISABLE_LOGIN_PAGE"`
|
||||
DisableSignUp *bool `json:"DISABLE_SIGN_UP"`
|
||||
DisableRedisForEnv *bool `json:"DISABLE_REDIS_FOR_ENV"`
|
||||
DisableStrongPassword *bool `json:"DISABLE_STRONG_PASSWORD"`
|
||||
DisableMultiFactorAuthentication *bool `json:"DISABLE_MULTI_FACTOR_AUTHENTICATION"`
|
||||
EnforceMultiFactorAuthentication *bool `json:"ENFORCE_MULTI_FACTOR_AUTHENTICATION"`
|
||||
Roles []string `json:"ROLES"`
|
||||
ProtectedRoles []string `json:"PROTECTED_ROLES"`
|
||||
DefaultRoles []string `json:"DEFAULT_ROLES"`
|
||||
JwtRoleClaim *string `json:"JWT_ROLE_CLAIM"`
|
||||
GoogleClientID *string `json:"GOOGLE_CLIENT_ID"`
|
||||
GoogleClientSecret *string `json:"GOOGLE_CLIENT_SECRET"`
|
||||
GithubClientID *string `json:"GITHUB_CLIENT_ID"`
|
||||
GithubClientSecret *string `json:"GITHUB_CLIENT_SECRET"`
|
||||
FacebookClientID *string `json:"FACEBOOK_CLIENT_ID"`
|
||||
FacebookClientSecret *string `json:"FACEBOOK_CLIENT_SECRET"`
|
||||
LinkedinClientID *string `json:"LINKEDIN_CLIENT_ID"`
|
||||
LinkedinClientSecret *string `json:"LINKEDIN_CLIENT_SECRET"`
|
||||
AppleClientID *string `json:"APPLE_CLIENT_ID"`
|
||||
AppleClientSecret *string `json:"APPLE_CLIENT_SECRET"`
|
||||
TwitterClientID *string `json:"TWITTER_CLIENT_ID"`
|
||||
TwitterClientSecret *string `json:"TWITTER_CLIENT_SECRET"`
|
||||
MicrosoftClientID *string `json:"MICROSOFT_CLIENT_ID"`
|
||||
MicrosoftClientSecret *string `json:"MICROSOFT_CLIENT_SECRET"`
|
||||
MicrosoftActiveDirectoryTenantID *string `json:"MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID"`
|
||||
OrganizationName *string `json:"ORGANIZATION_NAME"`
|
||||
OrganizationLogo *string `json:"ORGANIZATION_LOGO"`
|
||||
DefaultAuthorizeResponseType *string `json:"DEFAULT_AUTHORIZE_RESPONSE_TYPE"`
|
||||
DefaultAuthorizeResponseMode *string `json:"DEFAULT_AUTHORIZE_RESPONSE_MODE"`
|
||||
DisablePlayground *bool `json:"DISABLE_PLAYGROUND"`
|
||||
AccessTokenExpiryTime *string `json:"ACCESS_TOKEN_EXPIRY_TIME,omitempty"`
|
||||
AdminSecret *string `json:"ADMIN_SECRET,omitempty"`
|
||||
CustomAccessTokenScript *string `json:"CUSTOM_ACCESS_TOKEN_SCRIPT,omitempty"`
|
||||
OldAdminSecret *string `json:"OLD_ADMIN_SECRET,omitempty"`
|
||||
SMTPHost *string `json:"SMTP_HOST,omitempty"`
|
||||
SMTPPort *string `json:"SMTP_PORT,omitempty"`
|
||||
SMTPUsername *string `json:"SMTP_USERNAME,omitempty"`
|
||||
SMTPPassword *string `json:"SMTP_PASSWORD,omitempty"`
|
||||
SMTPLocalName *string `json:"SMTP_LOCAL_NAME,omitempty"`
|
||||
SenderEmail *string `json:"SENDER_EMAIL,omitempty"`
|
||||
SenderName *string `json:"SENDER_NAME,omitempty"`
|
||||
JwtType *string `json:"JWT_TYPE,omitempty"`
|
||||
JwtSecret *string `json:"JWT_SECRET,omitempty"`
|
||||
JwtPrivateKey *string `json:"JWT_PRIVATE_KEY,omitempty"`
|
||||
JwtPublicKey *string `json:"JWT_PUBLIC_KEY,omitempty"`
|
||||
AllowedOrigins []string `json:"ALLOWED_ORIGINS,omitempty"`
|
||||
AppURL *string `json:"APP_URL,omitempty"`
|
||||
ResetPasswordURL *string `json:"RESET_PASSWORD_URL,omitempty"`
|
||||
AppCookieSecure *bool `json:"APP_COOKIE_SECURE,omitempty"`
|
||||
AdminCookieSecure *bool `json:"ADMIN_COOKIE_SECURE,omitempty"`
|
||||
DisableEmailVerification *bool `json:"DISABLE_EMAIL_VERIFICATION,omitempty"`
|
||||
DisableBasicAuthentication *bool `json:"DISABLE_BASIC_AUTHENTICATION,omitempty"`
|
||||
DisableMagicLinkLogin *bool `json:"DISABLE_MAGIC_LINK_LOGIN,omitempty"`
|
||||
DisableLoginPage *bool `json:"DISABLE_LOGIN_PAGE,omitempty"`
|
||||
DisableSignUp *bool `json:"DISABLE_SIGN_UP,omitempty"`
|
||||
DisableRedisForEnv *bool `json:"DISABLE_REDIS_FOR_ENV,omitempty"`
|
||||
DisableStrongPassword *bool `json:"DISABLE_STRONG_PASSWORD,omitempty"`
|
||||
DisableMultiFactorAuthentication *bool `json:"DISABLE_MULTI_FACTOR_AUTHENTICATION,omitempty"`
|
||||
EnforceMultiFactorAuthentication *bool `json:"ENFORCE_MULTI_FACTOR_AUTHENTICATION,omitempty"`
|
||||
Roles []string `json:"ROLES,omitempty"`
|
||||
ProtectedRoles []string `json:"PROTECTED_ROLES,omitempty"`
|
||||
DefaultRoles []string `json:"DEFAULT_ROLES,omitempty"`
|
||||
JwtRoleClaim *string `json:"JWT_ROLE_CLAIM,omitempty"`
|
||||
GoogleClientID *string `json:"GOOGLE_CLIENT_ID,omitempty"`
|
||||
GoogleClientSecret *string `json:"GOOGLE_CLIENT_SECRET,omitempty"`
|
||||
GithubClientID *string `json:"GITHUB_CLIENT_ID,omitempty"`
|
||||
GithubClientSecret *string `json:"GITHUB_CLIENT_SECRET,omitempty"`
|
||||
FacebookClientID *string `json:"FACEBOOK_CLIENT_ID,omitempty"`
|
||||
FacebookClientSecret *string `json:"FACEBOOK_CLIENT_SECRET,omitempty"`
|
||||
LinkedinClientID *string `json:"LINKEDIN_CLIENT_ID,omitempty"`
|
||||
LinkedinClientSecret *string `json:"LINKEDIN_CLIENT_SECRET,omitempty"`
|
||||
AppleClientID *string `json:"APPLE_CLIENT_ID,omitempty"`
|
||||
AppleClientSecret *string `json:"APPLE_CLIENT_SECRET,omitempty"`
|
||||
TwitterClientID *string `json:"TWITTER_CLIENT_ID,omitempty"`
|
||||
TwitterClientSecret *string `json:"TWITTER_CLIENT_SECRET,omitempty"`
|
||||
MicrosoftClientID *string `json:"MICROSOFT_CLIENT_ID,omitempty"`
|
||||
MicrosoftClientSecret *string `json:"MICROSOFT_CLIENT_SECRET,omitempty"`
|
||||
MicrosoftActiveDirectoryTenantID *string `json:"MICROSOFT_ACTIVE_DIRECTORY_TENANT_ID,omitempty"`
|
||||
OrganizationName *string `json:"ORGANIZATION_NAME,omitempty"`
|
||||
OrganizationLogo *string `json:"ORGANIZATION_LOGO,omitempty"`
|
||||
DefaultAuthorizeResponseType *string `json:"DEFAULT_AUTHORIZE_RESPONSE_TYPE,omitempty"`
|
||||
DefaultAuthorizeResponseMode *string `json:"DEFAULT_AUTHORIZE_RESPONSE_MODE,omitempty"`
|
||||
DisablePlayground *bool `json:"DISABLE_PLAYGROUND,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateProfileInput struct {
|
||||
OldPassword *string `json:"old_password"`
|
||||
NewPassword *string `json:"new_password"`
|
||||
ConfirmNewPassword *string `json:"confirm_new_password"`
|
||||
Email *string `json:"email"`
|
||||
GivenName *string `json:"given_name"`
|
||||
FamilyName *string `json:"family_name"`
|
||||
MiddleName *string `json:"middle_name"`
|
||||
Nickname *string `json:"nickname"`
|
||||
Gender *string `json:"gender"`
|
||||
Birthdate *string `json:"birthdate"`
|
||||
PhoneNumber *string `json:"phone_number"`
|
||||
Picture *string `json:"picture"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled"`
|
||||
AppData map[string]interface{} `json:"app_data"`
|
||||
OldPassword *string `json:"old_password,omitempty"`
|
||||
NewPassword *string `json:"new_password,omitempty"`
|
||||
ConfirmNewPassword *string `json:"confirm_new_password,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
GivenName *string `json:"given_name,omitempty"`
|
||||
FamilyName *string `json:"family_name,omitempty"`
|
||||
MiddleName *string `json:"middle_name,omitempty"`
|
||||
Nickname *string `json:"nickname,omitempty"`
|
||||
Gender *string `json:"gender,omitempty"`
|
||||
Birthdate *string `json:"birthdate,omitempty"`
|
||||
PhoneNumber *string `json:"phone_number,omitempty"`
|
||||
Picture *string `json:"picture,omitempty"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled,omitempty"`
|
||||
AppData map[string]interface{} `json:"app_data,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateUserInput struct {
|
||||
ID string `json:"id"`
|
||||
Email *string `json:"email"`
|
||||
EmailVerified *bool `json:"email_verified"`
|
||||
GivenName *string `json:"given_name"`
|
||||
FamilyName *string `json:"family_name"`
|
||||
MiddleName *string `json:"middle_name"`
|
||||
Nickname *string `json:"nickname"`
|
||||
Gender *string `json:"gender"`
|
||||
Birthdate *string `json:"birthdate"`
|
||||
PhoneNumber *string `json:"phone_number"`
|
||||
Picture *string `json:"picture"`
|
||||
Roles []*string `json:"roles"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled"`
|
||||
AppData map[string]interface{} `json:"app_data"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
EmailVerified *bool `json:"email_verified,omitempty"`
|
||||
GivenName *string `json:"given_name,omitempty"`
|
||||
FamilyName *string `json:"family_name,omitempty"`
|
||||
MiddleName *string `json:"middle_name,omitempty"`
|
||||
Nickname *string `json:"nickname,omitempty"`
|
||||
Gender *string `json:"gender,omitempty"`
|
||||
Birthdate *string `json:"birthdate,omitempty"`
|
||||
PhoneNumber *string `json:"phone_number,omitempty"`
|
||||
Picture *string `json:"picture,omitempty"`
|
||||
Roles []*string `json:"roles,omitempty"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled,omitempty"`
|
||||
AppData map[string]interface{} `json:"app_data,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateWebhookRequest struct {
|
||||
ID string `json:"id"`
|
||||
EventName *string `json:"event_name"`
|
||||
EventDescription *string `json:"event_description"`
|
||||
Endpoint *string `json:"endpoint"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Headers map[string]interface{} `json:"headers"`
|
||||
EventName *string `json:"event_name,omitempty"`
|
||||
EventDescription *string `json:"event_description,omitempty"`
|
||||
Endpoint *string `json:"endpoint,omitempty"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Headers map[string]interface{} `json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
|
@ -431,22 +431,22 @@ type User struct {
|
|||
Email string `json:"email"`
|
||||
EmailVerified bool `json:"email_verified"`
|
||||
SignupMethods string `json:"signup_methods"`
|
||||
GivenName *string `json:"given_name"`
|
||||
FamilyName *string `json:"family_name"`
|
||||
MiddleName *string `json:"middle_name"`
|
||||
Nickname *string `json:"nickname"`
|
||||
PreferredUsername *string `json:"preferred_username"`
|
||||
Gender *string `json:"gender"`
|
||||
Birthdate *string `json:"birthdate"`
|
||||
PhoneNumber *string `json:"phone_number"`
|
||||
PhoneNumberVerified *bool `json:"phone_number_verified"`
|
||||
Picture *string `json:"picture"`
|
||||
GivenName *string `json:"given_name,omitempty"`
|
||||
FamilyName *string `json:"family_name,omitempty"`
|
||||
MiddleName *string `json:"middle_name,omitempty"`
|
||||
Nickname *string `json:"nickname,omitempty"`
|
||||
PreferredUsername *string `json:"preferred_username,omitempty"`
|
||||
Gender *string `json:"gender,omitempty"`
|
||||
Birthdate *string `json:"birthdate,omitempty"`
|
||||
PhoneNumber *string `json:"phone_number,omitempty"`
|
||||
PhoneNumberVerified *bool `json:"phone_number_verified,omitempty"`
|
||||
Picture *string `json:"picture,omitempty"`
|
||||
Roles []string `json:"roles"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
RevokedTimestamp *int64 `json:"revoked_timestamp"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled"`
|
||||
AppData map[string]interface{} `json:"app_data"`
|
||||
CreatedAt *int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt *int64 `json:"updated_at,omitempty"`
|
||||
RevokedTimestamp *int64 `json:"revoked_timestamp,omitempty"`
|
||||
IsMultiFactorAuthEnabled *bool `json:"is_multi_factor_auth_enabled,omitempty"`
|
||||
AppData map[string]interface{} `json:"app_data,omitempty"`
|
||||
}
|
||||
|
||||
type Users struct {
|
||||
|
@ -457,17 +457,17 @@ type Users struct {
|
|||
type ValidateJWTTokenInput struct {
|
||||
TokenType string `json:"token_type"`
|
||||
Token string `json:"token"`
|
||||
Roles []string `json:"roles"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
}
|
||||
|
||||
type ValidateJWTTokenResponse struct {
|
||||
IsValid bool `json:"is_valid"`
|
||||
Claims map[string]interface{} `json:"claims"`
|
||||
Claims map[string]interface{} `json:"claims,omitempty"`
|
||||
}
|
||||
|
||||
type ValidateSessionInput struct {
|
||||
Cookie string `json:"cookie"`
|
||||
Roles []string `json:"roles"`
|
||||
Roles []string `json:"roles,omitempty"`
|
||||
}
|
||||
|
||||
type ValidateSessionResponse struct {
|
||||
|
@ -477,14 +477,14 @@ type ValidateSessionResponse struct {
|
|||
|
||||
type VerificationRequest struct {
|
||||
ID string `json:"id"`
|
||||
Identifier *string `json:"identifier"`
|
||||
Token *string `json:"token"`
|
||||
Email *string `json:"email"`
|
||||
Expires *int64 `json:"expires"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
Nonce *string `json:"nonce"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
Identifier *string `json:"identifier,omitempty"`
|
||||
Token *string `json:"token,omitempty"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
Expires *int64 `json:"expires,omitempty"`
|
||||
CreatedAt *int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt *int64 `json:"updated_at,omitempty"`
|
||||
Nonce *string `json:"nonce,omitempty"`
|
||||
RedirectURI *string `json:"redirect_uri,omitempty"`
|
||||
}
|
||||
|
||||
type VerificationRequests struct {
|
||||
|
@ -494,35 +494,35 @@ type VerificationRequests struct {
|
|||
|
||||
type VerifyEmailInput struct {
|
||||
Token string `json:"token"`
|
||||
State *string `json:"state"`
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type VerifyOTPRequest struct {
|
||||
Email *string `json:"email"`
|
||||
PhoneNumber *string `json:"phone_number"`
|
||||
Email *string `json:"email,omitempty"`
|
||||
PhoneNumber *string `json:"phone_number,omitempty"`
|
||||
Otp string `json:"otp"`
|
||||
State *string `json:"state"`
|
||||
State *string `json:"state,omitempty"`
|
||||
}
|
||||
|
||||
type Webhook struct {
|
||||
ID string `json:"id"`
|
||||
EventName *string `json:"event_name"`
|
||||
EventDescription *string `json:"event_description"`
|
||||
Endpoint *string `json:"endpoint"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
Headers map[string]interface{} `json:"headers"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
EventName *string `json:"event_name,omitempty"`
|
||||
EventDescription *string `json:"event_description,omitempty"`
|
||||
Endpoint *string `json:"endpoint,omitempty"`
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
Headers map[string]interface{} `json:"headers,omitempty"`
|
||||
CreatedAt *int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt *int64 `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type WebhookLog struct {
|
||||
ID string `json:"id"`
|
||||
HTTPStatus *int64 `json:"http_status"`
|
||||
Response *string `json:"response"`
|
||||
Request *string `json:"request"`
|
||||
WebhookID *string `json:"webhook_id"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
HTTPStatus *int64 `json:"http_status,omitempty"`
|
||||
Response *string `json:"response,omitempty"`
|
||||
Request *string `json:"request,omitempty"`
|
||||
WebhookID *string `json:"webhook_id,omitempty"`
|
||||
CreatedAt *int64 `json:"created_at,omitempty"`
|
||||
UpdatedAt *int64 `json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
type WebhookLogs struct {
|
||||
|
|
|
@ -2,6 +2,7 @@ package graph
|
|||
|
||||
// This file will be automatically regenerated based on the schema, any resolver implementations
|
||||
// will be copied through when generating and any unknown code will be moved to the end.
|
||||
// Code generated by github.com/99designs/gqlgen version v0.17.39
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
|
@ -43,10 +43,14 @@ func signupTests(t *testing.T, s TestSetup) {
|
|||
Email: email,
|
||||
Password: s.TestInfo.Password,
|
||||
ConfirmPassword: s.TestInfo.Password,
|
||||
AppData: map[string]interface{}{
|
||||
"test": "test",
|
||||
},
|
||||
})
|
||||
assert.Nil(t, err, "signup should be successful")
|
||||
user := *res.User
|
||||
assert.Equal(t, email, user.Email)
|
||||
assert.Equal(t, "test", user.AppData["test"])
|
||||
assert.Nil(t, res.AccessToken, "access token should be nil")
|
||||
res, err = resolvers.SignupResolver(ctx, model.SignUpInput{
|
||||
Email: email,
|
||||
|
|
|
@ -50,8 +50,19 @@ func updateUserTest(t *testing.T, s TestSetup) {
|
|||
_, err = resolvers.UpdateUserResolver(ctx, model.UpdateUserInput{
|
||||
ID: user.ID,
|
||||
Roles: newRoles,
|
||||
AppData: map[string]interface{}{
|
||||
"test": "test",
|
||||
},
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
// Get user and check if roles are updated
|
||||
users, err := resolvers.UsersResolver(ctx, nil)
|
||||
assert.Nil(t, err)
|
||||
for _, u := range users.Users {
|
||||
if u.ID == user.ID {
|
||||
assert.Equal(t, u.AppData["test"], "test")
|
||||
}
|
||||
}
|
||||
cleanData(email)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user