Module: PkceChallenge

Defined in:
lib/pkce_challenge.rb,
lib/pkce_challenge/version.rb,
lib/pkce_challenge/challenge.rb

Defined Under Namespace

Classes: Challenge, LengthOutOfRangeError

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.challenge(options = {}) ⇒ Object

Generate code challenge and verfiier

Example:

>> PkceChallenge.challenge
=> #<PkceChallenge::Challenge:0x00007f894f810378 @char_length=48, @code_verifier="QbS08cDO9pce~HVCKe9-UDiJoBMG8xwql4FI.Y3CIdpyJtPU", @code_challenge="HT90mmypkXgneRUVK-Ja009VvnoL-flydbEgRcTp5Yw">

Parameters:

options

A Hash containing optional arguments. Supported options can include ‘:char_length`

Returns:

An instance of PkceChallenge::Challenge



23
24
25
# File 'lib/pkce_challenge.rb', line 23

def self.challenge(options = {})
  PkceChallenge::Challenge.new(options)
end