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

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Error::Behaviour

included

Class Method Details

.no_cookie!Object

Raises:

  • (self)

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

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

.unauthenticated!Object

Raises:

  • (self)

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

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

Instance Method Details

#api_error(response) ⇒ Object


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

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