apple

package
v0.25.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package apple implements OpenID Connect for apple

https://www.pomerium.com/docs/identity-providers/apple

Index

Constants

View Source
const Name = "apple"

Name identifies the apple identity provider.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is an Apple implementation of the Authenticator interface.

func New

func New(_ context.Context, o *oauth.Options) (*Provider, error)

New instantiates an OpenID Connect (OIDC) provider for Apple.

func (*Provider) Authenticate

func (p *Provider) Authenticate(ctx context.Context, code string, v identity.State) (*oauth2.Token, error)

Authenticate converts an authorization code returned from the identity provider into a token which is then converted into a user session.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

func (*Provider) Refresh

func (p *Provider) Refresh(ctx context.Context, t *oauth2.Token, v identity.State) (*oauth2.Token, error)

Refresh renews a user's session.

func (*Provider) Revoke

func (p *Provider) Revoke(ctx context.Context, t *oauth2.Token) error

Revoke method will remove all the Apple grants the user gave pomerium application during authorization.

func (*Provider) SignIn added in v0.25.0

func (p *Provider) SignIn(w http.ResponseWriter, r *http.Request, state string) error

SignIn redirects to the url of the provider's OAuth 2.0 consent page that asks for permissions for the required scopes explicitly.

State is a token to protect the user from CSRF attacks. You must always provide a non-empty string and validate that it matches the the state query parameter on your redirect callback. See http://tools.ietf.org/html/rfc6749#section-10.12 for more info.

func (*Provider) SignOut added in v0.25.0

func (p *Provider) SignOut(_ http.ResponseWriter, _ *http.Request, _, _, _ string) error

SignOut is not implemented.

func (*Provider) UpdateUserInfo

func (p *Provider) UpdateUserInfo(_ context.Context, t *oauth2.Token, v interface{}) error

UpdateUserInfo gets claims from the oauth token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL