auth: Addres review
This commit is contained in:
parent
b5c11f31b7
commit
6554db3e5f
@ -26,7 +26,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(401)
|
||||
return
|
||||
}
|
||||
token = token[len("Bearer "):]
|
||||
token = strings.TrimPrefix(token, "Bearer ")
|
||||
|
||||
allow, err := h.Verify(ctx, token)
|
||||
if err != nil {
|
||||
|
@ -56,7 +56,7 @@ type ClientCloser func()
|
||||
// NewClient creates new josnrpc 2.0 client
|
||||
//
|
||||
// handler must be pointer to a struct with function fields
|
||||
// Returned value closes the client connectionnil
|
||||
// Returned value closes the client connection
|
||||
// TODO: Example
|
||||
func NewClient(addr string, namespace string, handler interface{}, requestHeader http.Header) (ClientCloser, error) {
|
||||
htyp := reflect.TypeOf(handler)
|
||||
|
Loading…
Reference in New Issue
Block a user