class OverSIP::Modules::Callsign::Token
Attributes
access_token[RW]
client_id[RW]
expires_in[RW]
identity[RW]
revision[RW]
scope[RW]
token_type[RW]
Public Class Methods
from_json(json_string)
click to toggle source
# File lib/oversip-mod-callsign/token.rb, line 31 def self.from_json(json_string) json = JSON.parse(json_string) Token.new json['access_token'], json['client_id'], json['identity'], json['scope'], json['revision'], json['expires_in'], json['token_type'] end
new(access_token, client_id, identity, scope, revision, expires_in, token_type)
click to toggle source
# File lib/oversip-mod-callsign/token.rb, line 21 def initialize(access_token, client_id, identity, scope, revision, expires_in, token_type) @access_token = access_token @client_id = client_id @identity = Identity.parse identity @scope = scope @revision = revision @expires_in = expires_in @token_type = token_type end
Public Instance Methods
scopes()
click to toggle source
# File lib/oversip-mod-callsign/token.rb, line 17 def scopes @scopes ||= @scope.split ' ' end