From 9a2da81b11ad0064cca24ce7974827d032309369 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 1 May 2023 07:56:25 -0600 Subject: name change gus -> sliderule --- contrib/tlsauth/auth.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'contrib/tlsauth/auth.go') diff --git a/contrib/tlsauth/auth.go b/contrib/tlsauth/auth.go index 38ec3a3..439d297 100644 --- a/contrib/tlsauth/auth.go +++ b/contrib/tlsauth/auth.go @@ -4,11 +4,11 @@ import ( "context" "crypto/x509" - "tildegit.org/tjp/gus" + sr "tildegit.org/tjp/sliderule" ) // Identity returns the client certificate for the request or nil if there is none. -func Identity(request *gus.Request) *x509.Certificate { +func Identity(request *sr.Request) *x509.Certificate { if request.TLSState == nil || len(request.TLSState.PeerCertificates) == 0 { return nil } @@ -19,8 +19,8 @@ func Identity(request *gus.Request) *x509.Certificate { // // The check requires both that there is a client certificate associated with the // request and that it passes the provided approver. -func RequiredAuth(approve Approver) func(context.Context, *gus.Request) bool { - return func(_ context.Context, request *gus.Request) bool { +func RequiredAuth(approve Approver) func(context.Context, *sr.Request) bool { + return func(_ context.Context, request *sr.Request) bool { identity := Identity(request) if identity == nil { return false @@ -34,8 +34,8 @@ func RequiredAuth(approve Approver) func(context.Context, *gus.Request) bool { // // The check allows through any request with no client certificate, but if // there is one present then it requires that it pass the provided approver. -func OptionalAuth(approve Approver) func(context.Context, *gus.Request) bool { - return func(_ context.Context, request *gus.Request) bool { +func OptionalAuth(approve Approver) func(context.Context, *sr.Request) bool { + return func(_ context.Context, request *sr.Request) bool { identity := Identity(request) if identity == nil { return true -- cgit v1.2.3