-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from xmidt-org/feature/simpler-middleware-opt…
…ions simplified workflow setup for HTTP middleware
- Loading branch information
Showing
4 changed files
with
67 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package basculehttp | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/xmidt-org/bascule/v1" | ||
) | ||
|
||
// NewAuthenticator is a convenient wrapper around bascule.NewAuthenticator. | ||
// This function eases the syntactical pain of generics when creating Middleware. | ||
func NewAuthenticator(opts ...bascule.AuthenticatorOption[*http.Request]) (*bascule.Authenticator[*http.Request], error) { | ||
return bascule.NewAuthenticator(opts...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package basculehttp | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/xmidt-org/bascule/v1" | ||
) | ||
|
||
// NewAuthorizer is a convenient wrapper around bascule.NewAuthorizer. | ||
// This function eases the syntactical pain of generics when creating Middleware. | ||
func NewAuthorizer(opts ...bascule.AuthorizerOption[*http.Request]) (*bascule.Authorizer[*http.Request], error) { | ||
return bascule.NewAuthorizer(opts...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters