Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • Motp

Class Motp

Mobile One Time Password generator/validator, based on the http://motp.sourceforge.net specification.

Package: blesta\components\auth\motp
Located at components/auth/motp/motp.php

Methods summary

public
# __construct( string $pin = null, string $secret = null, integer $length = 6 )

Creates a new Motp object with the given seeded values

Creates a new Motp object with the given seeded values

Parameters

$pin
string
$pin The pin to use for this one time password
$secret
string
$secret The secret hash to use for this one time password
$length
integer
$length The length of the one time password
public
# seed( string $pin, string $secret, integer $length = 6 )

Seed the Motp object with the given values

Seed the Motp object with the given values

Parameters

$pin
string
$pin The pin to use for this one time password
$secret
string
$secret The secret hash to use for this one time password
$length
integer
$length The length of the one time password
public boolean
# checkOtp( string $otp, integer $time )

Attempts to find a match for the given one time password with the given time value.

Attempts to find a match for the given one time password with the given time value.

Parameters

$otp
string
$otp A suspected one time password
$time
integer
$time The time around which the given otp should have originated

Returns

boolean
True if the one time password is valid, false otherwise
public string
# opt( integer $time )

Generates a one time password based on the given time and the preset secret and pin.

Generates a one time password based on the given time and the preset secret and pin.

Parameters

$time
integer
$time The time to use as a seed for this one time password

Returns

string
The one time password generated by the given time

See

Motp::seed()

Magic methods summary

Blesta API documentation generated by ApiGen 2.8.0