Exception: Core::Service::Authentication::UnauthenticatedError

Inherits:
Error
  • Object
show all
Defined in:
app/api/core/service/authentication.rb

Overview

rubocop:todo Style/Documentation

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Error::Behaviour

included

Class Method Details

.no_cookie!Object

Raises:

  • (self)

4
5
6
# File 'app/api/core/service/authentication.rb', line 4

def self.no_cookie!
  raise self, 'no authentication provided'
end

.unauthenticated!Object

Raises:

  • (self)

8
9
10
# File 'app/api/core/service/authentication.rb', line 8

def self.unauthenticated!
  raise self, 'could not be authenticated'
end

Instance Method Details

#api_error(response) ⇒ Object


12
13
14
# File 'app/api/core/service/authentication.rb', line 12

def api_error(response)
  response.general_error(401)
end