BigW Consortium Gitlab

util.js.coffee.erb 302 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Helper class for U2F (universal 2nd factor) device registration and authentication.

class @U2FUtil
  @isU2FSupported: ->
    if @testMode
      true
    else
      gon.u2f.browser_supports_u2f

  @enableTestMode: ->
    @testMode = true

<% if Rails.env.test? %>
U2FUtil.enableTestMode();
<% end %>