class Pebbles::Command::Auth
authentication (login, logout)
Public Instance Methods
index()
click to toggle source
auth
Authenticate, display token and current user
# File lib/pebbles/command/auth.rb, line 10 def index validate_arguments! Pebbles::Command::Help.new.send(:help_for_command, current_command) end
login()
click to toggle source
auth:login log in with your Pebblescape credentials
Example:
$ pebbles auth:login Enter your Pebblescape credentials: Email: email@example.com Password (typing will be hidden): Authentication successful.
# File lib/pebbles/command/auth.rb, line 28 def login validate_arguments! Pebbles::Auth.login display "Authentication successful." end
logout()
click to toggle source
auth:logout clear local authentication credentials
Example:
$ pebbles auth:logout Local credentials cleared.
# File lib/pebbles/command/auth.rb, line 46 def logout validate_arguments! Pebbles::Auth.logout display "Local credentials cleared." end
token()
click to toggle source
auth:token display your api token
Example:
$ pebbles auth:token ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCD
# File lib/pebbles/command/auth.rb, line 64 def token validate_arguments! display Pebbles::Auth.api_key end
whoami()
click to toggle source
auth:whoami display your Pebblescape email address
Example:
$ pebbles auth:whoami email@example.com
# File lib/pebbles/command/auth.rb, line 79 def whoami validate_arguments! display Pebbles::Auth.user end