jwk

package
v0.0.0-...-52d9772 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright (C) 2018 Yahoo Japan Corporation Athenz team.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package jwk represents the jwk daemon fetching logic and the interface

Copyright (C) 2018 Yahoo Japan Corporation Athenz team.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2018 Yahoo Japan Corporation Athenz team.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFetchAthenzJWK "Fetch athenz json web key error"
	ErrFetchAthenzJWK = errors.New("Fetch athenz json web key error")
)

Functions

This section is empty.

Types

type Daemon

type Daemon interface {
	Start(ctx context.Context) <-chan error
	Update(context.Context) error
	GetProvider() Provider
}

Daemon represents the daemon to retrieve jwk from Athenz.

func New

func New(opts ...Option) (Daemon, error)

New represent the constructor of Policyd

type Option

type Option func(*jwkd) error

Option represents a functional options pattern interface

func WithAthenzURL

func WithAthenzURL(url string) Option

WithAthenzURL represents set athenzURL functional option

func WithErrRetryInterval

func WithErrRetryInterval(i string) Option

WithErrRetryInterval represents a ErrRetryInterval functional option

func WithHTTPClient

func WithHTTPClient(cl *http.Client) Option

WithHTTPClient represents a HTTPClient functional option

func WithRefreshDuration

func WithRefreshDuration(t string) Option

WithRefreshDuration represents a RefreshDuration functional option

type Provider

type Provider func(keyID string) interface{}

Provider represent the jwk provider to retrive the json web key.

Jump to

Keyboard shortcuts

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