Documentation
¶
Index ¶
- Constants
- Variables
- type Builder
- func (b *Builder) AccessTokenTTL(ttl time.Duration) *Builder
- func (b *Builder) ActiveKID(kid string) *Builder
- func (b *Builder) Build() (*Server, error)
- func (b *Builder) Client(client Client) *Builder
- func (b *Builder) Clients(clients ...Client) *Builder
- func (b *Builder) Clock(now func() time.Time) *Builder
- func (b *Builder) Issuer(issuer string) *Builder
- func (b *Builder) MaxBody(size int64) *Builder
- func (b *Builder) Must() *Server
- func (b *Builder) Signer(signer Signer) *Builder
- func (b *Builder) Signers(signers ...Signer) *Builder
- func (b *Builder) Store(store ClientStore) *Builder
- func (b *Builder) TTL(ttl time.Duration) *Builder
- type Client
- func (c Client) Audience(audience string) Client
- func (c Client) Audiences(audiences ...string) Client
- func (c Client) Defaults(scopes ...string) Client
- func (c Client) Disable() Client
- func (c Client) Normalize() Client
- func (c Client) Scope(scope string) Client
- func (c Client) Scopes(scopes ...string) Client
- func (c Client) Secret(secret string) Client
- func (c Client) SecretSHA256(hexValue string) Client
- func (c Client) ValidateScopePolicy() error
- func (c Client) VerifySecret(secret string) bool
- type ClientStore
- type Config
- type MemoryClientStore
- type Server
- func (s *Server) DiscoveryHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) HealthHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Issuer() string
- func (s *Server) JWKSHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) JWKSURI() string
- func (s *Server) TokenEndpoint() string
- func (s *Server) TokenHTTP(w http.ResponseWriter, r *http.Request)
- type Signer
Constants ¶
View Source
const DefaultMaxTokenRequestBody = 1 << 20
Variables ¶
View Source
var ( ErrClientNotFound = errors.New("orionis server: client not found") )
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func FromConfig ¶
func (*Builder) Store ¶
func (b *Builder) Store(store ClientStore) *Builder
type Client ¶
type Client struct {
ID string `json:"id"`
Secrets []string `json:"secrets,omitempty"`
SecretSHA256Hex []string `json:"secret_sha256_hex,omitempty"`
AllowedAudiences []string `json:"allowed_audiences"`
AllowedScopes []string `json:"allowed_scopes"`
DefaultScopes []string `json:"default_scopes,omitempty"`
Disabled bool `json:"disabled,omitempty"`
}
func (Client) SecretSHA256 ¶
func (Client) ValidateScopePolicy ¶ added in v0.3.0
func (Client) VerifySecret ¶
type ClientStore ¶
type MemoryClientStore ¶
type MemoryClientStore struct {
// contains filtered or unexported fields
}
func MemoryStore ¶
func MemoryStore(clients ...Client) *MemoryClientStore
func NewMemoryClientStore ¶
func NewMemoryClientStore(clients ...Client) *MemoryClientStore
func (*MemoryClientStore) FindClient ¶
func (*MemoryClientStore) Upsert ¶
func (s *MemoryClientStore) Upsert(c Client)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) DiscoveryHTTP ¶
func (s *Server) DiscoveryHTTP(w http.ResponseWriter, r *http.Request)
func (*Server) HealthHTTP ¶
func (s *Server) HealthHTTP(w http.ResponseWriter, r *http.Request)
func (*Server) TokenEndpoint ¶
Click to show internal directories.
Click to hide internal directories.