mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 10:35:32 +02:00
rpcserver+macaroons: extract RawMacaroonFromContext
We'll re-use the code for extracting a macaroon from a request context later on so we extract it into its own exported function.
This commit is contained in:
@ -6995,8 +6995,7 @@ func (r *rpcServer) CheckMacaroonPermissions(ctx context.Context,
|
||||
}
|
||||
|
||||
err := r.macService.CheckMacAuth(
|
||||
ctx, hex.EncodeToString(req.Macaroon), permissions,
|
||||
req.FullMethod,
|
||||
ctx, req.Macaroon, permissions, req.FullMethod,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, err.Error())
|
||||
|
Reference in New Issue
Block a user