Class: Basecamp::Oauth::DeviceAuthorization
- Inherits:
-
Data
- Object
- Data
- Basecamp::Oauth::DeviceAuthorization
- Defined in:
- lib/basecamp/oauth/device_authorization.rb
Overview
RFC 8628 device authorization response (the device/user code pair the user approves out of band).
Instance Attribute Summary collapse
-
#device_code ⇒ String
readonly
The device verification code polled at the token endpoint.
-
#expires_in ⇒ Integer
readonly
Lifetime of the device/user codes in seconds.
-
#interval ⇒ Integer
readonly
Minimum seconds to wait between token polls (defaults to 5 when the server omits it).
-
#user_code ⇒ String
readonly
The code the user enters at the verification URI.
-
#verification_uri ⇒ String
readonly
Where the user goes to approve the request.
-
#verification_uri_complete ⇒ String?
readonly
The verification URI with the user code pre-filled (optional; absent when the server omits it).
Instance Method Summary collapse
-
#initialize(device_code:, user_code:, verification_uri:, expires_in:, interval:, verification_uri_complete: nil) ⇒ DeviceAuthorization
constructor
A new instance of DeviceAuthorization.
Constructor Details
#initialize(device_code:, user_code:, verification_uri:, expires_in:, interval:, verification_uri_complete: nil) ⇒ DeviceAuthorization
Returns a new instance of DeviceAuthorization.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 25 def initialize( device_code:, user_code:, verification_uri:, expires_in:, interval:, verification_uri_complete: nil ) super end |
Instance Attribute Details
#device_code ⇒ String (readonly)
The device verification code polled at the token endpoint.
17 18 19 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 17 def device_code @device_code end |
#expires_in ⇒ Integer (readonly)
Lifetime of the device/user codes in seconds.
17 18 19 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 17 def expires_in @expires_in end |
#interval ⇒ Integer (readonly)
Minimum seconds to wait between token polls (defaults to 5 when the server omits it).
17 18 19 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 17 def interval @interval end |
#user_code ⇒ String (readonly)
The code the user enters at the verification URI.
17 18 19 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 17 def user_code @user_code end |
#verification_uri ⇒ String (readonly)
Where the user goes to approve the request.
17 18 19 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 17 def verification_uri @verification_uri end |
#verification_uri_complete ⇒ String? (readonly)
The verification URI with the user code pre-filled (optional; absent when the server omits it).
17 18 19 |
# File 'lib/basecamp/oauth/device_authorization.rb', line 17 def verification_uri_complete @verification_uri_complete end |