Class: KarstIdentityController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/karst/install/templates/karst_identity_controller.rb

Overview

Development-only endpoints used by the custom probe hooks in karst.rb.

Instance Method Summary collapse

Instance Method Details

#createObject

Raises:

  • (NotImplementedError)


7
8
9
10
11
12
13
# File 'lib/generators/karst/install/templates/karst_identity_controller.rb', line 7

def create
  principal = Karst::Identity.resolve(model_name: params[:principal_type], id: params[:principal_id])
  return head(:forbidden) unless principal

  # TODO: establish this app's authentication for principal, then return a response.
  raise NotImplementedError, "Implement this application's custom Karst sign-in"
end

#destroyObject

Raises:

  • (NotImplementedError)


15
16
17
18
# File 'lib/generators/karst/install/templates/karst_identity_controller.rb', line 15

def destroy
  # TODO: clear the authentication established by create, then return a response.
  raise NotImplementedError, "Implement this application's custom Karst sign-out"
end