lucee.Componentcontentbox.models.security.twofactor.BaseTwoFactorProvider
contentbox.modules.contentbox-admin.modules.contentbox-security.modules.contentbox-email-twofactor.models.EmailTwoFactorProvider
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Provides email two factor authentication. This provider leverages the `template` cache to store unique tokens.
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
cache
|
true
|
false
|
|
any
|
mailService
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
boolean
|
allowTrustedDevice()
If true, then ContentBox will set a tracking cookie for the authentication provider user browser. |
any
|
finalize(string code, any author)
This method is called once a two factor challenge is accepted and valid. |
string
|
generateValidationToken(any author)
This function will store a validation token in hash for the user to validate on. |
any
|
getAuthorOptions()
Get the author options form. |
any
|
getAuthorSetupForm(any author)
Returns html to display to the user for required two-factor fields. |
any
|
getAuthorSetupHelp(any author)
Get the display help for the provider. |
any
|
getDisplayName()
Get the display name of the provider. |
any
|
getName()
Get the internal name of the provider. |
any
|
getVerificationHelp()
Get the display help for the provider. |
struct
|
sendChallenge(any author)
Send a challenge via the 2 factor auth implementation. |
struct
|
verifyChallenge(string code, any author)
Verify the challenge. |
Methods inherited from class contentbox.models.security.twofactor.BaseTwoFactorProvider |
---|
getAllSettings |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- cachebox:templateserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- mailService@cbmailservicesserializable
- trueMethod Detail |
---|
If true, then ContentBox will set a tracking cookie for the authentication provider user browser. If the user, logs in and the device is within the trusted timespan, then no two-factor authentication validation will occur.
allowTrustedDevice
in interface
ITwoFactorProvider
This method is called once a two factor challenge is accepted and valid. Meaning the user has completed the validation and will be logged in to ContentBox now.
finalize
in interface
ITwoFactorProvider
code
- The verification codeauthor
- The author to verify challengeThis function will store a validation token in hash for the user to validate on
author
- The author to create the token for.Get the author options form. This will be sent for saving. You can listen to save operations by listening to the event 'cbadmin_onAuthorTwoFactorSaveOptions'
Returns html to display to the user for required two-factor fields
getAuthorSetupForm
in interface
ITwoFactorProvider
author
Get the display help for the provider. Used in the UI setup screens for the author
getAuthorSetupHelp
in interface
ITwoFactorProvider
author
Get the display name of the provider
getDisplayName
in interface
ITwoFactorProvider
Get the internal name of the provider
getName
in interface
ITwoFactorProvider
Get the display help for the provider. Used in the UI verification screen.
getVerificationHelp
in interface
ITwoFactorProvider
Send a challenge via the 2 factor auth implementation. The return must be a struct with an error boolean bit and a messages string
sendChallenge
in interface
ITwoFactorProvider
author
- The author to challengeVerify the challenge
verifyChallenge
in interface
ITwoFactorProvider
code
- The verification codeauthor
- The author to verify challenge