ext_authz_server

command
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 8 Imported by: 0

README

ext_authz_server

Notes

  1. authv3.CheckResponse.Status should use grpc codes but not http status code, and use google.golang.org/genproto/googleapis/rpc/status to fill in.
  2. authv3.CheckResponse.Status definitively means ALLOW or DENY but not the Status in authv3.CheckResponse.HttpResponse
  3. When the reqeust is denied by external authorization server, if you want to get not only http status code but response body, you can set it in the body of authv3.CheckResponse_DeniedResponse:
    return &authv3.CheckResponse{
        // ...
    	HttpResponse: &authv3.CheckResponse_DeniedResponse{
            // ...
    		DeniedResponse: &authv3.DeniedHttpResponse{
    			Body:   fmt.Sprintf(`{"code": %s, "message": "request denied"}`, code),
    		},
    	},
    }
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL