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.61.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.60.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.59.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.58.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.57.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.56.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.55.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.54.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.53.1 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.53.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.52.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.51.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.50.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.49.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.48.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.47.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.46.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.45.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.44.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.43.0 lib/rspectacular/helpers/session_helpers.rb