Sha256: bacced46de8e277f53f8b67633942b86d2b90b0530fb356929a6e4438f620055

Contents?: true

Size: 165 Bytes

Versions: 58

Compression:

Stored size: 165 Bytes

Contents

def authenticate_api_as(user)
  auth_token = user.respond_to?(:auth_token) ? user.auth_token : user

  request.env['HTTP_AUTHORIZATION'] = "Token #{auth_token}"
end

Version data entries

58 entries across 58 versions & 2 rubygems

Version Path
rspectacular-0.70.8 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.7 lib/rspectacular/helpers/session_helpers.rb
rspeckled-0.0.2 lib/rspeckled/helpers/session_helpers.rb
rspeckled-0.0.1 lib/rspeckled/helpers/session_helpers.rb
rspectacular-0.70.6 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.5 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.4 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.3 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.2 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.1 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.70.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.69.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.68.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.67.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.66.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.65.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.64.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.63.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.62.1 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.62.0 lib/rspectacular/helpers/session_helpers.rb