Class: TokenAction::Token

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps, Model
Defined in:
lib/token_action/orm/mongoid.rb,
lib/token_action/orm/active_record.rb

Overview

A token to authenticate an action.

Instance Method Summary collapse

Instance Method Details

#argsArray

Any additional arguments for the action.

Returns:

  • (Array)

    a list of arguments



22
# File 'lib/token_action/orm/mongoid.rb', line 22

field :args, type: Array

#failure_urlString

The URL to redirect to after failing to perform the action.

Returns:

  • (String)

    a URL or path



30
# File 'lib/token_action/orm/mongoid.rb', line 30

field :failure_url, type: String

#kindString

Note:

‘class` clashes with `Object#class` and Mongoid reserves `klass`.

The class on which to perform the action.

Returns:

  • (String)

    a class name



18
# File 'lib/token_action/orm/mongoid.rb', line 18

field :kind, type: String

#success_urlString

The URL to redirect to after performing the action successfully.

Returns:

  • (String)

    a URL or path



26
# File 'lib/token_action/orm/mongoid.rb', line 26

field :success_url, type: String

#tokenString

A shared secret.

Returns:

  • (String)

    a token



13
# File 'lib/token_action/orm/mongoid.rb', line 13

field :token, type: String