session

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 5 Imported by: 1

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, id string) (*clerk.Session, error)

Get retrieves details for a session.

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 NewClient

func NewClient(config *clerk.ClientConfig) *Client

func (*Client) Get

func (c *Client) Get(ctx context.Context, id string) (*clerk.Session, error)

Get retrieves details for a session.

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"`
}

type VerifyParams

type VerifyParams struct {
	ID    string  `json:"-"`
	Token *string `json:"token,omitempty"`
}

Jump to

Keyboard shortcuts

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