File: source.go

package info (click to toggle)
golang-github-spiffe-go-spiffe 2.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,116 kB
  • sloc: makefile: 157
file content (21 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package jwtsvid

import (
	"context"

	"github.com/spiffe/go-spiffe/v2/spiffeid"
)

// Params are JWT-SVID parameters used when fetching a new JWT-SVID.
type Params struct {
	Audience       string
	ExtraAudiences []string
	Subject        spiffeid.ID
}

// Source represents a source of JWT-SVIDs.
type Source interface {
	// FetchJWTSVID fetches a JWT-SVID from the source with the given
	// parameters.
	FetchJWTSVID(ctx context.Context, params Params) (*SVID, error)
}