1 class Oauth2Token < AccessToken
4 def as_json(_options = {})
5 d = { :access_token => token, :token_type => "bearer" }
6 d[:expires_in] = expires_in if expires_at
11 q = "access_token=#{token}&token_type=bearer"
12 q << "&state=#{URI.escape(state)}" if @state
13 q << "&expires_in=#{expires_in}" if expires_at
14 q << "&scope=#{URI.escape(scope)}" if scope
19 expires_at.to_i - Time.now.to_i