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.42.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.41.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.40.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.39.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.38.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.37.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.36.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.35.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.34.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.33.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.31.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.30.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.29.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.28.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.27.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.26.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.25.0 lib/rspectacular/helpers/session_helpers.rb
rspectacular-0.24.0 lib/rspectacular/helpers/session_helpers.rb