-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move examples and build helpers to new repo (#7)
* Move examples and build helpers to new repo * Remove unused deps
- Loading branch information
1 parent
07591cd
commit 5c8b4bc
Showing
16 changed files
with
70 additions
and
625 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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
.idea | ||
vendor | ||
**.so | ||
_glooe | ||
vendor |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# ext-auth-plugins | ||
# External auth plugins | ||
This repository contains two public interfaces: | ||
- `AuthService`: is the interface implemented by all [Gloo ext auth implementations](https://gloo.solo.io/gloo_routing/virtual_services/authentication/) | ||
- `ExtAuthPlugin`: is the interface that needs to be implemented by custom go ext auth plugins | ||
|
||
Be sure to check out the docs at gloo.solo.io for more information! |
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,49 @@ | ||
package api_test | ||
|
||
import ( | ||
"context" | ||
"github.com/envoyproxy/go-control-plane/envoy/service/auth/v2" | ||
"github.com/solo-io/ext-auth-plugins/api" | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestApi(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Api Suite") | ||
} | ||
|
||
var _ = Describe("api has no errors", func() { | ||
|
||
It("can compile everything", func() { | ||
var pluginImpl api.ExtAuthPlugin = &pluginImpl{} | ||
_, err := pluginImpl.NewConfigInstance(context.Background()) | ||
Expect(err).NotTo(HaveOccurred()) | ||
|
||
svc, err := pluginImpl.GetAuthService(context.Background(), nil) | ||
Expect(err).NotTo(HaveOccurred()) | ||
Expect(svc).NotTo(BeNil()) | ||
}) | ||
}) | ||
|
||
type pluginImpl struct{} | ||
|
||
func (pluginImpl) NewConfigInstance(ctx context.Context) (configInstance interface{}, err error) { | ||
return nil, nil | ||
} | ||
|
||
func (pluginImpl) GetAuthService(ctx context.Context, configInstance interface{}) (api.AuthService, error) { | ||
return &serviceImpl{}, nil | ||
} | ||
|
||
type serviceImpl struct{} | ||
|
||
func (serviceImpl) Start(ctx context.Context) error { | ||
return nil | ||
} | ||
|
||
func (serviceImpl) Authorize(ctx context.Context, request *v2.CheckRequest) (*api.AuthorizationResponse, error) { | ||
return nil, nil | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
changelog: | ||
- type: NON_USER_FACING | ||
description: > | ||
Move example plugins and build tools to [new repo](https://github.com/solo-io/ext-auth-plugin-examples). | ||
This is needed to avoid circular dependencies between GlooE and this repo. |
Oops, something went wrong.