diff --git a/utils/auth.go b/utils/auth.go index 6a366e72a6..82cd8c0887 100644 --- a/utils/auth.go +++ b/utils/auth.go @@ -10,7 +10,7 @@ type Scope interface { Compare(Scope) bool } -// IAuthorizer is an interfaces to authorize a scope +// Authorizer is an interfaces to authorize a scope type Authorizer interface { // Authorize is expected to set the Authorization on the Context. If // Authorization fails, an error should be returned, but additionally, @@ -19,7 +19,7 @@ type Authorizer interface { Authorize(Context, ...Scope) error } -// IAuthorization is an interface to determine whether +// Authorization is an interface to determine whether // an object has a scope type Authorization interface { HasScope(Scope) bool diff --git a/utils/context.go b/utils/context.go index 82f0f00eae..1edb239686 100644 --- a/utils/context.go +++ b/utils/context.go @@ -5,7 +5,7 @@ import ( "net/http" ) -// IContext defines an interface for managing authorizations. +// Context defines an interface for managing authorizations. type Context interface { // TODO: define a set of standard getters. Using getters // will allow us to easily and transparently cache @@ -29,7 +29,7 @@ type Context interface { Trust() signed.TrustService } -// IContextFactory creates a IContext from an http request. +// ContextFactory creates a IContext from an http request. type ContextFactory func(*http.Request, signed.TrustService) Context // Context represents an authorization context for a resource. @@ -39,7 +39,7 @@ type context struct { trust signed.TrustService } -// ContextFactory creates a new authorization context with the +// NewContext creates a new authorization context with the // given HTTP request path as the resource. func NewContext(r *http.Request, trust signed.TrustService) Context { return &context{