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



26
27
28
29
# File 'lib/gruf/interceptors/authentication/basic.rb', line 26

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