Module: SingleUserOauth::Keys

Extended by:
Keys
Included in:
SingleUserOauth, Keys
Defined in:
lib/single_user_oauth/keys.rb

Instance Method Summary collapse

Instance Method Details

#nonceObject



6
7
8
# File 'lib/single_user_oauth/keys.rb', line 6

def nonce
  @nonce ||= OpenSSL::Random.random_bytes(16).unpack('H*')[0]
end

#signature_methodObject



10
11
12
# File 'lib/single_user_oauth/keys.rb', line 10

def signature_method
  "HMAC-SHA1".freeze
end

#timestampObject



14
15
16
# File 'lib/single_user_oauth/keys.rb', line 14

def timestamp
  @timestamp ||= Time.now.to_i.to_s
end

#versionObject



18
19
20
# File 'lib/single_user_oauth/keys.rb', line 18

def version
  "1.0".freeze
end