Skip to content

Commit

Permalink
Set NewAuthConfig builder public (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
instabledesign authored Dec 17, 2020
1 parent 23ef6d2 commit 00ac90b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// Authentication middleware delegate the authentication process to the AuthenticateFunc
func Authentication(authenticateFunc AuthenticateFunc, options ...AuthOption) httpware.Middleware {
config := newAuthConfig(options...)
config := NewAuthConfig(options...)
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(writer http.ResponseWriter, req *http.Request) {
newReq, err := authenticateFunc(req)
Expand Down Expand Up @@ -44,7 +44,7 @@ func (o *AuthConfig) apply(options ...AuthOption) {
}
}

func newAuthConfig(options ...AuthOption) *AuthConfig {
func NewAuthConfig(options ...AuthOption) *AuthConfig {
opts := &AuthConfig{
errorHandler: DefaultErrorHandler,
successMiddleware: httpware.NopMiddleware,
Expand Down

0 comments on commit 00ac90b

Please sign in to comment.