mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-20 20:47:16 +02:00
ping: identity and directory providers (#1975)
* ping: add identity provider * ping: implement directory provider * ping, not onelogin * ping, not onelogin * escape path params
This commit is contained in:
parent
00a1cb7456
commit
fd97561ab1
7 changed files with 738 additions and 0 deletions
39
internal/identity/oidc/ping/ping.go
Normal file
39
internal/identity/oidc/ping/ping.go
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Package ping implements OpenID Connect for Ping
|
||||
//
|
||||
// https://www.pomerium.io/docs/identity-providers/ping.html
|
||||
package ping
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/pomerium/pomerium/internal/identity/oauth"
|
||||
pom_oidc "github.com/pomerium/pomerium/internal/identity/oidc"
|
||||
)
|
||||
|
||||
const (
|
||||
// Name identifies the Ping identity provider.
|
||||
Name = "ping"
|
||||
)
|
||||
|
||||
// Provider is a Ping implementation of the Authenticator interface.
|
||||
type Provider struct {
|
||||
*pom_oidc.Provider
|
||||
}
|
||||
|
||||
// New instantiates an OpenID Connect (OIDC) provider for Ping.
|
||||
func New(ctx context.Context, o *oauth.Options) (*Provider, error) {
|
||||
var p Provider
|
||||
var err error
|
||||
genericOidc, err := pom_oidc.New(ctx, o)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s: failed creating oidc provider: %w", Name, err)
|
||||
}
|
||||
p.Provider = genericOidc
|
||||
return &p, nil
|
||||
}
|
||||
|
||||
// Name returns the provider name.
|
||||
func (p *Provider) Name() string {
|
||||
return Name
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue