
* fix: * removed hasReversedValue in playground * feat: * added totp methods in db's providers * adding totp in login method * feat: * added toggle in dashboard * fixing issue with env set * feat: * integrated totp * feat: * encrypted userid * added totp_verified column in user table * started test for totp * feat: * test cases totp * test-cases: * completed test cases * tested for all dbs * fixes: * return variable to snake case * import refactoring * feat: * created seperate folder for authenticator with totp subfolder * refactored code * created new table for authenticators * added recovery code for totp * feat: * adding functions to different db providers * feat: * added authenticators method for all db * feat: * added logic for updating mfa in user_profile update * fix: * merge conflict * fix: * resolved mongodb, dynamodb and arangodb test case bug * added new condition for checking first time totp user or not * feat: * changes in all respective db with authenticator * fix: * PR suggested changes * fix(cassandra): list users * Update verify otp * fix totp login api --------- Co-authored-by: lemonScaletech <anand.panigrahi@scaletech.xyz>
34 lines
1.1 KiB
Go
34 lines
1.1 KiB
Go
package models
|
|
|
|
// CollectionList / Tables available for authorizer in the database
|
|
type CollectionList struct {
|
|
User string
|
|
VerificationRequest string
|
|
Session string
|
|
Env string
|
|
Webhook string
|
|
WebhookLog string
|
|
EmailTemplate string
|
|
OTP string
|
|
SMSVerificationRequest string
|
|
Authenticators string
|
|
}
|
|
|
|
var (
|
|
// Prefix for table name / collection names
|
|
Prefix = "authorizer_"
|
|
// Collections / Tables available for authorizer in the database (used for dbs other than gorm)
|
|
Collections = CollectionList{
|
|
User: Prefix + "users",
|
|
VerificationRequest: Prefix + "verification_requests",
|
|
Session: Prefix + "sessions",
|
|
Env: Prefix + "env",
|
|
Webhook: Prefix + "webhooks",
|
|
WebhookLog: Prefix + "webhook_logs",
|
|
EmailTemplate: Prefix + "email_templates",
|
|
OTP: Prefix + "otps",
|
|
SMSVerificationRequest: Prefix + "sms_verification_requests",
|
|
Authenticators: Prefix + "authenticators",
|
|
}
|
|
)
|