Class: Acme::Authorizer::TokensController

Inherits:
ApplicationController show all
Defined in:
app/controllers/acme/authorizer/tokens_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
# File 'app/controllers/acme/authorizer/tokens_controller.rb', line 4

def show
  token = params[:token]
  if acme_authorizer_config.valid_token?(token)
    render plain: acme_authorizer_config.key_authorization_for_token(token)
  else
    head :not_found
  end
end