gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/go-grpc-middleware/auth/doc.go (about)

     1  // Copyright 2016 Michal Witkowski. All Rights Reserved.
     2  // See LICENSE for licensing terms.
     3  
     4  /*
     5  `grpc_auth` a generic server-side auth middleware for gRPC.
     6  
     7  Server Side Auth Middleware
     8  
     9  It allows for easy assertion of `:authorization` headers in gRPC calls, be it HTTP Basic auth, or
    10  OAuth2 Bearer tokens.
    11  
    12  The middleware takes a user-customizable `AuthFunc`, which can be customized to verify and extract
    13  auth information from the request. The extracted information can be put in the `context.Context` of
    14  handlers downstream for retrieval.
    15  
    16  It also allows for per-service implementation overrides of `AuthFunc`. See `ServiceAuthFuncOverride`.
    17  
    18  Please see examples for simple examples of use.
    19  */
    20  
    21  package grpc_auth