Class: Gruf::Interceptors::Authentication::Basic

Inherits:
ServerInterceptor show all
Defined in:
lib/gruf/interceptors/authentication/basic.rb

Overview

Handles basic authentication for gRPC requests

Instance Attribute Summary

Attributes inherited from Base

#error, #options, #request

Instance Method Summary collapse

Methods included from Errors::Helpers

#fail!

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Gruf::Interceptors::Base

Instance Method Details

#callObject

Validate authentication



30
31
32
33
# File 'lib/gruf/interceptors/authentication/basic.rb', line 30

def call
  fail!(:unauthenticated, :unauthenticated) unless bypass? || valid?
  yield
end