access_token.rb revision 4c5fc55b01865cb3867ff4988c8316bcbe80aa02
9b6c3209f4771089ca721d40cb96ff49b348e802Eugen Kuksa scope :expired, ->() { where('expiration <= ?', Time.now) }
5513a7cc4f5859d263e4cb66ae93e8dbfcf3681fEugen Kuksa scope :unexpired, ->() { where('expiration > ?', Time.now) }
0050586f79baaf40dbe2cba81c239cad7939b283Eugen Kuksa # Although unlikely, the token could clash with another one. Generate tokens
0050586f79baaf40dbe2cba81c239cad7939b283Eugen Kuksa # until there is no conflict. This should converge extremely fast.
0050586f79baaf40dbe2cba81c239cad7939b283Eugen Kuksa while access_token.nil? || access_token.invalid? do
490da89281b7ee019c87406fb8ce7359aff0932cEugen Kuksa Settings.access_token.expiration_minutes.minutes.from_now
4c5fc55b01865cb3867ff4988c8316bcbe80aa02Eugen Kuksa token: generate_token_string(ontology_version, repository)},