oathclients

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package oathclients contains clients endpoints and helpers related to client credentials.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckClientIntegrity

func CheckClientIntegrity(name string, c *pb.Client) error

CheckClientIntegrity check if the given clientHandler integrity.

func ExtractClientID

func ExtractClientID(r *http.Request) string

ExtractClientID from request.

func ExtractClientSecret

func ExtractClientSecret(r *http.Request) string

ExtractClientSecret from request.

func NewAdminClientHandler

func NewAdminClientHandler(s ClientService, useHydra bool, httpClient *http.Client, hydraAdminURL string) *adminClientHandler

NewAdminClientHandler returns adminClientHandler

func NewClientHandler

func NewClientHandler(s ClientService) *clientHandler

NewClientHandler returns clientHandler.

func SyncClients added in v0.8.4

func SyncClients(httpClient *http.Client, hydraAdminURL string, clients map[string]*pb.Client, secrets map[string]string) (*pb.ClientState, error)

SyncClients resets clients in hydra with given clients and secrets.

func SyncState added in v0.8.4

func SyncState(httpClient *http.Client, hydraAdminURL string, clients map[string]*pb.Client, secrets map[string]string) (*pb.ClientState, error)

SyncState calculates what client sync operations are needed between hydra and the service.

Types

type ClientService

type ClientService interface {
	HandlerSetup(tx storage.Tx, r *http.Request) (*ga4gh.Identity, int, error)
	ClientByName(name string) *pb.Client
	SaveClient(name, secret string, cli *pb.Client)
	RemoveClient(name string, cli *pb.Client)
	Save(tx storage.Tx, desc, typeName string, r *http.Request, id *ga4gh.Identity, m *pb.ConfigModification) error
	CheckIntegrity(r *http.Request, m *pb.ConfigModification) *status.Status
}

ClientService provides data storage for clients.

Jump to

Keyboard shortcuts

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