// Authorize validates the user identity, device, and context of a request for
// a given route. Currently only checks identity.
Authorize validates the user identity, device, and context of a request for
a given route. Currently only checks identity.
// Authorize validates the user identity device and context of a request for // a given route . Currently only checks identity .
func (a *Authorize) Authorize(ctx context.Context, in *pb.AuthorizeRequest) (*pb.AuthorizeReply, error) {
	ok := a.ValidIdentity(in.Route, &Identity{in.User, in.Email, in.Groups})
	log.Debug().Str("route", in.Route).Strs("groups", in.Groups).Str("email", in.Email).Bool("Valid?", ok).Msg("authorize/grpc")
	return &pb.AuthorizeReply{IsValid: ok}, nil
}
func ( a * Authorize ) Authorize ( ctx context . Context , in * pb . AuthorizeRequest ) ( * pb . AuthorizeReply , error ) { ok := a . ValidIdentity ( in . Route , & Identity { in . User , in . Email , in . Groups } ) log . Debug ( ) . Str ( " " , in . Route ) . Strs ( " " , in . Groups ) . Str ( " " , in . Email ) . Bool ( " " , ok ) . Msg ( " " ) return & pb . AuthorizeReply { IsValid : ok } , nil }
Authorize validates the user identity, device, and context of a request for
a given route.
Authorize validates the user identity device and context of a request for a given route .