Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateUserProviderSession(ctx context.Context, userID string, create *auth.ProviderSessionCreate) (*auth.ProviderSession, error)
- func (c *Client) CreateUserRestrictedToken(ctx context.Context, userID string, create *auth.RestrictedTokenCreate) (*auth.RestrictedToken, error)
- func (c *Client) DeleteProviderSession(ctx context.Context, id string) error
- func (c *Client) DeleteRestrictedToken(ctx context.Context, id string) error
- func (c *Client) GetProviderSession(ctx context.Context, id string) (*auth.ProviderSession, error)
- func (c *Client) GetRestrictedToken(ctx context.Context, id string) (*auth.RestrictedToken, error)
- func (c *Client) ListUserProviderSessions(ctx context.Context, userID string, filter *auth.ProviderSessionFilter, ...) (auth.ProviderSessions, error)
- func (c *Client) ListUserRestrictedTokens(ctx context.Context, userID string, filter *auth.RestrictedTokenFilter, ...) (auth.RestrictedTokens, error)
- func (c *Client) UpdateProviderSession(ctx context.Context, id string, update *auth.ProviderSessionUpdate) (*auth.ProviderSession, error)
- func (c *Client) UpdateRestrictedToken(ctx context.Context, id string, update *auth.RestrictedTokenUpdate) (*auth.RestrictedToken, error)
- type Config
- type External
- type ExternalConfig
Constants ¶
View Source
const ( TidepoolServerNameHeaderName = "X-Tidepool-Server-Name" TidepoolServerSecretHeaderName = "X-Tidepool-Server-Secret" ServerSessionTokenTimeoutOnFailureFirst = 1 * time.Second ServerSessionTokenTimeoutOnFailureLast = 60 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *External // contains filtered or unexported fields }
func (*Client) CreateUserProviderSession ¶
func (c *Client) CreateUserProviderSession(ctx context.Context, userID string, create *auth.ProviderSessionCreate) (*auth.ProviderSession, error)
func (*Client) CreateUserRestrictedToken ¶
func (c *Client) CreateUserRestrictedToken(ctx context.Context, userID string, create *auth.RestrictedTokenCreate) (*auth.RestrictedToken, error)
func (*Client) DeleteProviderSession ¶
func (*Client) DeleteRestrictedToken ¶
func (*Client) GetProviderSession ¶
func (*Client) GetRestrictedToken ¶
func (*Client) ListUserProviderSessions ¶
func (c *Client) ListUserProviderSessions(ctx context.Context, userID string, filter *auth.ProviderSessionFilter, pagination *page.Pagination) (auth.ProviderSessions, error)
func (*Client) ListUserRestrictedTokens ¶
func (c *Client) ListUserRestrictedTokens(ctx context.Context, userID string, filter *auth.RestrictedTokenFilter, pagination *page.Pagination) (auth.RestrictedTokens, error)
func (*Client) UpdateProviderSession ¶
func (c *Client) UpdateProviderSession(ctx context.Context, id string, update *auth.ProviderSessionUpdate) (*auth.ProviderSession, error)
func (*Client) UpdateRestrictedToken ¶
func (c *Client) UpdateRestrictedToken(ctx context.Context, id string, update *auth.RestrictedTokenUpdate) (*auth.RestrictedToken, error)
type Config ¶
type Config struct { *platform.Config *ExternalConfig }
type External ¶
type External struct {
// contains filtered or unexported fields
}
func NewExternal ¶
func NewExternal(cfg *ExternalConfig, authorizeAs platform.AuthorizeAs, name string, lgr log.Logger) (*External, error)
func (*External) ServerSessionToken ¶
type ExternalConfig ¶
type ExternalConfig struct { *platform.Config ServerSessionTokenSecret string ServerSessionTokenTimeout time.Duration }
func NewExternalConfig ¶
func NewExternalConfig() *ExternalConfig
func (*ExternalConfig) Validate ¶
func (e *ExternalConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.