Documentation ¶
Overview ¶
Code generated by "gen"; DO NOT EDIT. This file is meant to be re-generated in place and/or deleted at any time.
Package session provides the Sessions API.
Index ¶
- func Get(ctx context.Context, id string) (*clerk.Session, error)
- func List(ctx context.Context, params *ListParams) (*clerk.SessionList, error)
- func Revoke(ctx context.Context, params *RevokeParams) (*clerk.Session, error)
- func Verify(ctx context.Context, params *VerifyParams) (*clerk.Session, error)deprecated
- type Client
- func (c *Client) Get(ctx context.Context, id string) (*clerk.Session, error)
- func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.SessionList, error)
- func (c *Client) Revoke(ctx context.Context, params *RevokeParams) (*clerk.Session, error)
- func (c *Client) Verify(ctx context.Context, params *VerifyParams) (*clerk.Session, error)deprecated
- type ListParams
- type RevokeParams
- type VerifyParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(ctx context.Context, params *ListParams) (*clerk.SessionList, error)
List returns a list of sessions.
func Revoke ¶
func Revoke(ctx context.Context, params *RevokeParams) (*clerk.Session, error)
Revoke marks the session as revoked.
func Verify
deprecated
func Verify(ctx context.Context, params *VerifyParams) (*clerk.Session, error)
Verify verifies the session.
Deprecated: The operation is deprecated and will be removed in future versions. It is recommended to switch to networkless verification using short-lived session tokens instead. See https://clerk.com/docs/backend-requests/resources/session-tokens
Types ¶
type Client ¶
type Client struct {
Backend clerk.Backend
}
Client is used to invoke the Sessions API.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, params *ListParams) (*clerk.SessionList, error)
List returns a list of sessions.
func (*Client) Revoke ¶
func (c *Client) Revoke(ctx context.Context, params *RevokeParams) (*clerk.Session, error)
Revoke marks the session as revoked.
func (*Client) Verify
deprecated
func (c *Client) Verify(ctx context.Context, params *VerifyParams) (*clerk.Session, error)
Verify verifies the session.
Deprecated: The operation is deprecated and will be removed in future versions. It is recommended to switch to networkless verification using short-lived session tokens instead. See https://clerk.com/docs/backend-requests/resources/session-tokens
type ListParams ¶
type ListParams struct { clerk.APIParams clerk.ListParams ClientID *string `json:"client_id,omitempty"` UserID *string `json:"user_id,omitempty"` Status *string `json:"status,omitempty"` }
func (*ListParams) ToQuery ¶
func (params *ListParams) ToQuery() url.Values
ToQuery returns the params as url.Values.
type RevokeParams ¶
type RevokeParams struct {
ID string `json:"id"`
}