Authly::DeviceCode
Inherits Authly::GrantStrategy < Reference < Object
Constants
SLOW_DOWN_STEP = 5
RFC 8628 section 3.5: seconds added to the interval each time the device polls too fast.
USER_CODE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"
No 0, 1, I or O. Eight of 32 characters are 40 bits, which the attempt limit at the verification page makes unguessable.
Constructors
new(client_id : String, device_code : String)
SourceClass methods
create_device_authorization(client_id : String, scope : String) : DeviceCodeData
Sourcegenerate_user_code
Sourcenormalize_user_code(input : String | Nil) : String | Nil
What a person typed as "ABCD-EFGH" (any case, dash optional, surrounding blanks), or nil when it cannot be a user code, so nothing malformed ever reaches a store.
Instance methods
authorized?
Sourceclient_id
Sourcedevice_code
Source