Documentation
¶
Overview ¶
Package passage provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- Constants
- func NewActivateUserRequest(server string, appID AppID, userID UserID) (*http.Request, error)
- func NewCreateMagicLinkRequest(server string, appID AppID, body CreateMagicLinkJSONRequestBody) (*http.Request, error)
- func NewCreateMagicLinkRequestWithBody(server string, appID AppID, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateUserRequest(server string, appID AppID, body CreateUserJSONRequestBody) (*http.Request, error)
- func NewCreateUserRequestWithBody(server string, appID AppID, contentType string, body io.Reader) (*http.Request, error)
- func NewDeactivateUserRequest(server string, appID AppID, userID UserID) (*http.Request, error)
- func NewDeleteUserDevicesRequest(server string, appID AppID, userID UserID, deviceID string) (*http.Request, error)
- func NewDeleteUserRequest(server string, appID AppID, userID UserID) (*http.Request, error)
- func NewGetUserRequest(server string, appID AppID, userID UserID) (*http.Request, error)
- func NewListPaginatedUsersRequest(server string, appID AppID, params *ListPaginatedUsersParams) (*http.Request, error)
- func NewListUserDevicesRequest(server string, appID AppID, userID UserID) (*http.Request, error)
- func NewRevokeUserRefreshTokensRequest(server string, appID AppID, userID UserID) (*http.Request, error)
- func NewUpdateUserRequest(server string, appID AppID, userID UserID, body UpdateUserJSONRequestBody) (*http.Request, error)
- func NewUpdateUserRequestWithBody(server string, appID AppID, userID UserID, contentType string, body io.Reader) (*http.Request, error)
- type ActivateUserResponse
- type AppID
- type AppleUserSocialConnection
- type Auth
- func (a *Auth) CreateMagicLinkWithEmail(email string, magicLinkType MagicLinkType, send bool, opts *MagicLinkOptions) (*MagicLink, error)
- func (a *Auth) CreateMagicLinkWithPhone(phone string, magicLinkType MagicLinkType, send bool, opts *MagicLinkOptions) (*MagicLink, error)
- func (a *Auth) CreateMagicLinkWithUser(userID string, channel ChannelType, magicLinkType MagicLinkType, send bool, ...) (*MagicLink, error)
- func (a *Auth) ValidateJWT(jwt string) (string, error)
- type ChannelType
- type Client
- func (c *Client) ActivateUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) CreateMagicLink(ctx context.Context, appID AppID, body CreateMagicLinkJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateMagicLinkWithBody(ctx context.Context, appID AppID, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateUser(ctx context.Context, appID AppID, body CreateUserJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateUserWithBody(ctx context.Context, appID AppID, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeactivateUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteUserDevices(ctx context.Context, appID AppID, userID UserID, deviceID string, ...) (*http.Response, error)
- func (c *Client) GetUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListPaginatedUsers(ctx context.Context, appID AppID, params *ListPaginatedUsersParams, ...) (*http.Response, error)
- func (c *Client) ListUserDevices(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) RevokeUserRefreshTokens(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateUser(ctx context.Context, appID AppID, userID UserID, ...) (*http.Response, error)
- func (c *Client) UpdateUserWithBody(ctx context.Context, appID AppID, userID UserID, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) ActivateUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*ActivateUserResponse, error)
- func (c *ClientWithResponses) CreateMagicLinkWithBodyWithResponse(ctx context.Context, appID AppID, contentType string, body io.Reader, ...) (*CreateMagicLinkResponse, error)
- func (c *ClientWithResponses) CreateMagicLinkWithResponse(ctx context.Context, appID AppID, body CreateMagicLinkJSONRequestBody, ...) (*CreateMagicLinkResponse, error)
- func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, appID AppID, contentType string, body io.Reader, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, appID AppID, body CreateUserJSONRequestBody, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) DeactivateUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*DeactivateUserResponse, error)
- func (c *ClientWithResponses) DeleteUserDevicesWithResponse(ctx context.Context, appID AppID, userID UserID, deviceID string, ...) (*DeleteUserDevicesResponse, error)
- func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
- func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
- func (c *ClientWithResponses) ListPaginatedUsersWithResponse(ctx context.Context, appID AppID, params *ListPaginatedUsersParams, ...) (*ListPaginatedUsersResponse, error)
- func (c *ClientWithResponses) ListUserDevicesWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*ListUserDevicesResponse, error)
- func (c *ClientWithResponses) RevokeUserRefreshTokensWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*RevokeUserRefreshTokensResponse, error)
- func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, appID AppID, userID UserID, contentType string, ...) (*UpdateUserResponse, error)
- func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, appID AppID, userID UserID, ...) (*UpdateUserResponse, error)
- type ClientWithResponsesInterface
- type CreateMagicLinkJSONRequestBody
- type CreateMagicLinkResponse
- type CreateUserArgs
- type CreateUserJSONRequestBody
- type CreateUserResponse
- type DeactivateUserResponse
- type DeleteUserDevicesResponse
- type DeleteUserResponse
- type GetUserResponse
- type GithubUserSocialConnection
- type GoogleUserSocialConnection
- type HttpRequestDoer
- type Link
- type ListDevicesResponse
- type ListPaginatedUsersItem
- type ListPaginatedUsersParams
- type ListPaginatedUsersResponse
- type ListUserDevicesResponse
- type MagicLink
- type MagicLinkLanguage
- type MagicLinkOptions
- type MagicLinkResponse
- type MagicLinkType
- type N400BadRequest
- type N400Error
- type N400ErrorCode
- type N401Error
- type N401ErrorCode
- type N401Unauthorized
- type N403Error
- type N403ErrorCode
- type N403Forbidden
- type N404Error
- type N404ErrorCode
- type N404NotFound
- type N500Error
- type N500ErrorCode
- type N500InternalServerError
- type PaginatedLinks
- type Passage
- type PassageError
- type PassageUser
- type RequestEditorFn
- type RevokeUserRefreshTokensResponse
- type SocialConnectionType
- type UpdateUserJSONRequestBody
- type UpdateUserOptions
- type UpdateUserResponse
- type User
- func (u *User) Activate(userID string) (*PassageUser, error)
- func (u *User) Create(args CreateUserArgs) (*PassageUser, error)
- func (u *User) Deactivate(userID string) (*PassageUser, error)
- func (u *User) Delete(userID string) error
- func (u *User) Get(userID string) (*PassageUser, error)
- func (u *User) GetByIdentifier(identifier string) (*PassageUser, error)
- func (u *User) ListDevices(userID string) ([]WebAuthnDevices, error)
- func (u *User) RevokeDevice(userID string, deviceID string) error
- func (u *User) RevokeRefreshTokens(userID string) error
- func (u *User) Update(userID string, options UpdateUserOptions) (*PassageUser, error)
- type UserEventAction
- type UserEventStatus
- type UserID
- type UserRecentEvent
- type UserResponse
- type UserSocialConnections
- type UserStatus
- type WebAuthnDevices
- type WebAuthnIcons
- type WebAuthnType
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewActivateUserRequest ¶
NewActivateUserRequest generates requests for ActivateUser
func NewCreateMagicLinkRequest ¶
func NewCreateMagicLinkRequest(server string, appID AppID, body CreateMagicLinkJSONRequestBody) (*http.Request, error)
NewCreateMagicLinkRequest calls the generic CreateMagicLink builder with application/json body
func NewCreateMagicLinkRequestWithBody ¶
func NewCreateMagicLinkRequestWithBody(server string, appID AppID, contentType string, body io.Reader) (*http.Request, error)
NewCreateMagicLinkRequestWithBody generates requests for CreateMagicLink with any type of body
func NewCreateUserRequest ¶
func NewCreateUserRequest(server string, appID AppID, body CreateUserJSONRequestBody) (*http.Request, error)
NewCreateUserRequest calls the generic CreateUser builder with application/json body
func NewCreateUserRequestWithBody ¶
func NewCreateUserRequestWithBody(server string, appID AppID, contentType string, body io.Reader) (*http.Request, error)
NewCreateUserRequestWithBody generates requests for CreateUser with any type of body
func NewDeactivateUserRequest ¶
NewDeactivateUserRequest generates requests for DeactivateUser
func NewDeleteUserDevicesRequest ¶
func NewDeleteUserDevicesRequest(server string, appID AppID, userID UserID, deviceID string) (*http.Request, error)
NewDeleteUserDevicesRequest generates requests for DeleteUserDevices
func NewDeleteUserRequest ¶
NewDeleteUserRequest generates requests for DeleteUser
func NewGetUserRequest ¶
NewGetUserRequest generates requests for GetUser
func NewListPaginatedUsersRequest ¶
func NewListPaginatedUsersRequest(server string, appID AppID, params *ListPaginatedUsersParams) (*http.Request, error)
NewListPaginatedUsersRequest generates requests for ListPaginatedUsers
func NewListUserDevicesRequest ¶
NewListUserDevicesRequest generates requests for ListUserDevices
func NewRevokeUserRefreshTokensRequest ¶
func NewRevokeUserRefreshTokensRequest(server string, appID AppID, userID UserID) (*http.Request, error)
NewRevokeUserRefreshTokensRequest generates requests for RevokeUserRefreshTokens
func NewUpdateUserRequest ¶
func NewUpdateUserRequest(server string, appID AppID, userID UserID, body UpdateUserJSONRequestBody) (*http.Request, error)
NewUpdateUserRequest calls the generic UpdateUser builder with application/json body
Types ¶
type ActivateUserResponse ¶
type ActivateUserResponse struct { Body []byte HTTPResponse *http.Response JSON200 *UserResponse JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseActivateUserResponse ¶
func ParseActivateUserResponse(rsp *http.Response) (*ActivateUserResponse, error)
ParseActivateUserResponse parses an HTTP response from a ActivateUserWithResponse call
func (ActivateUserResponse) Status ¶
func (r ActivateUserResponse) Status() string
Status returns HTTPResponse.Status
func (ActivateUserResponse) StatusCode ¶
func (r ActivateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AppleUserSocialConnection ¶
type AppleUserSocialConnection struct { CreatedAt time.Time `json:"created_at"` LastLoginAt time.Time `json:"last_login_at"` // ProviderID The external ID of the Social Connection. ProviderID string `json:"provider_id"` // ProviderIdentifier The email of connected social user. ProviderIdentifier string `json:"provider_identifier"` }
AppleUserSocialConnection defines model for AppleUserSocialConnection.
type Auth ¶ added in v2.1.0
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) CreateMagicLinkWithEmail ¶ added in v2.1.0
func (a *Auth) CreateMagicLinkWithEmail( email string, magicLinkType MagicLinkType, send bool, opts *MagicLinkOptions, ) (*MagicLink, error)
CreateMagicLink creates a Magic Link for your app using an email address.
func (*Auth) CreateMagicLinkWithPhone ¶ added in v2.1.0
func (a *Auth) CreateMagicLinkWithPhone( phone string, magicLinkType MagicLinkType, send bool, opts *MagicLinkOptions, ) (*MagicLink, error)
CreateMagicLink creates a Magic Link for your app using an E164-formatted phone number.
func (*Auth) CreateMagicLinkWithUser ¶ added in v2.1.0
func (a *Auth) CreateMagicLinkWithUser( userID string, channel ChannelType, magicLinkType MagicLinkType, send bool, opts *MagicLinkOptions, ) (*MagicLink, error)
CreateMagicLink creates a Magic Link for your app using a Passage user ID.
type ChannelType ¶
type ChannelType string
ChannelType The channel for magic link delivery: "email" or "phone". Required if "send" is true.
const ( EmailChannel ChannelType = "email" PhoneChannel ChannelType = "phone" )
Defines values for ChannelType.
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) ActivateUser ¶
func (*Client) CreateMagicLink ¶
func (c *Client) CreateMagicLink(ctx context.Context, appID AppID, body CreateMagicLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateMagicLinkWithBody ¶
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, appID AppID, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateUserWithBody ¶
func (*Client) DeactivateUser ¶
func (*Client) DeleteUser ¶
func (*Client) DeleteUserDevices ¶
func (*Client) ListPaginatedUsers ¶
func (c *Client) ListPaginatedUsers(ctx context.Context, appID AppID, params *ListPaginatedUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListUserDevices ¶
func (*Client) RevokeUserRefreshTokens ¶
func (*Client) UpdateUser ¶
func (c *Client) UpdateUser(ctx context.Context, appID AppID, userID UserID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // CreateMagicLinkWithBody request with any body CreateMagicLinkWithBody(ctx context.Context, appID AppID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateMagicLink(ctx context.Context, appID AppID, body CreateMagicLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListPaginatedUsers request ListPaginatedUsers(ctx context.Context, appID AppID, params *ListPaginatedUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateUserWithBody request with any body CreateUserWithBody(ctx context.Context, appID AppID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateUser(ctx context.Context, appID AppID, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteUser request DeleteUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) // GetUser request GetUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateUserWithBody request with any body UpdateUserWithBody(ctx context.Context, appID AppID, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateUser(ctx context.Context, appID AppID, userID UserID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ActivateUser request ActivateUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) // DeactivateUser request DeactivateUser(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) // ListUserDevices request ListUserDevices(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteUserDevices request DeleteUserDevices(ctx context.Context, appID AppID, userID UserID, deviceID string, reqEditors ...RequestEditorFn) (*http.Response, error) // RevokeUserRefreshTokens request RevokeUserRefreshTokens(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) ActivateUserWithResponse ¶
func (c *ClientWithResponses) ActivateUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*ActivateUserResponse, error)
ActivateUserWithResponse request returning *ActivateUserResponse
func (*ClientWithResponses) CreateMagicLinkWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateMagicLinkWithBodyWithResponse(ctx context.Context, appID AppID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMagicLinkResponse, error)
CreateMagicLinkWithBodyWithResponse request with arbitrary body returning *CreateMagicLinkResponse
func (*ClientWithResponses) CreateMagicLinkWithResponse ¶
func (c *ClientWithResponses) CreateMagicLinkWithResponse(ctx context.Context, appID AppID, body CreateMagicLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMagicLinkResponse, error)
func (*ClientWithResponses) CreateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, appID AppID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse
func (*ClientWithResponses) CreateUserWithResponse ¶
func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, appID AppID, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)
func (*ClientWithResponses) DeactivateUserWithResponse ¶
func (c *ClientWithResponses) DeactivateUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*DeactivateUserResponse, error)
DeactivateUserWithResponse request returning *DeactivateUserResponse
func (*ClientWithResponses) DeleteUserDevicesWithResponse ¶
func (c *ClientWithResponses) DeleteUserDevicesWithResponse(ctx context.Context, appID AppID, userID UserID, deviceID string, reqEditors ...RequestEditorFn) (*DeleteUserDevicesResponse, error)
DeleteUserDevicesWithResponse request returning *DeleteUserDevicesResponse
func (*ClientWithResponses) DeleteUserWithResponse ¶
func (c *ClientWithResponses) DeleteUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)
DeleteUserWithResponse request returning *DeleteUserResponse
func (*ClientWithResponses) GetUserWithResponse ¶
func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
GetUserWithResponse request returning *GetUserResponse
func (*ClientWithResponses) ListPaginatedUsersWithResponse ¶
func (c *ClientWithResponses) ListPaginatedUsersWithResponse(ctx context.Context, appID AppID, params *ListPaginatedUsersParams, reqEditors ...RequestEditorFn) (*ListPaginatedUsersResponse, error)
ListPaginatedUsersWithResponse request returning *ListPaginatedUsersResponse
func (*ClientWithResponses) ListUserDevicesWithResponse ¶
func (c *ClientWithResponses) ListUserDevicesWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*ListUserDevicesResponse, error)
ListUserDevicesWithResponse request returning *ListUserDevicesResponse
func (*ClientWithResponses) RevokeUserRefreshTokensWithResponse ¶
func (c *ClientWithResponses) RevokeUserRefreshTokensWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*RevokeUserRefreshTokensResponse, error)
RevokeUserRefreshTokensWithResponse request returning *RevokeUserRefreshTokensResponse
func (*ClientWithResponses) UpdateUserWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateUserWithBodyWithResponse(ctx context.Context, appID AppID, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
UpdateUserWithBodyWithResponse request with arbitrary body returning *UpdateUserResponse
func (*ClientWithResponses) UpdateUserWithResponse ¶
func (c *ClientWithResponses) UpdateUserWithResponse(ctx context.Context, appID AppID, userID UserID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // CreateMagicLinkWithBodyWithResponse request with any body CreateMagicLinkWithBodyWithResponse(ctx context.Context, appID AppID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMagicLinkResponse, error) CreateMagicLinkWithResponse(ctx context.Context, appID AppID, body CreateMagicLinkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMagicLinkResponse, error) // ListPaginatedUsersWithResponse request ListPaginatedUsersWithResponse(ctx context.Context, appID AppID, params *ListPaginatedUsersParams, reqEditors ...RequestEditorFn) (*ListPaginatedUsersResponse, error) // CreateUserWithBodyWithResponse request with any body CreateUserWithBodyWithResponse(ctx context.Context, appID AppID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) CreateUserWithResponse(ctx context.Context, appID AppID, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error) // DeleteUserWithResponse request DeleteUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error) // GetUserWithResponse request GetUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*GetUserResponse, error) // UpdateUserWithBodyWithResponse request with any body UpdateUserWithBodyWithResponse(ctx context.Context, appID AppID, userID UserID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) UpdateUserWithResponse(ctx context.Context, appID AppID, userID UserID, body UpdateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUserResponse, error) // ActivateUserWithResponse request ActivateUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*ActivateUserResponse, error) // DeactivateUserWithResponse request DeactivateUserWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*DeactivateUserResponse, error) // ListUserDevicesWithResponse request ListUserDevicesWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*ListUserDevicesResponse, error) // DeleteUserDevicesWithResponse request DeleteUserDevicesWithResponse(ctx context.Context, appID AppID, userID UserID, deviceID string, reqEditors ...RequestEditorFn) (*DeleteUserDevicesResponse, error) // RevokeUserRefreshTokensWithResponse request RevokeUserRefreshTokensWithResponse(ctx context.Context, appID AppID, userID UserID, reqEditors ...RequestEditorFn) (*RevokeUserRefreshTokensResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateMagicLinkJSONRequestBody ¶
type CreateMagicLinkJSONRequestBody = magicLinkArgs
CreateMagicLinkJSONRequestBody defines body for CreateMagicLink for application/json ContentType.
type CreateMagicLinkResponse ¶
type CreateMagicLinkResponse struct { Body []byte HTTPResponse *http.Response JSON201 *MagicLinkResponse JSON400 *N400BadRequest JSON401 *N401Unauthorized JSON403 *N403Forbidden JSON404 *N404NotFound JSON500 *N500InternalServerError }
func ParseCreateMagicLinkResponse ¶
func ParseCreateMagicLinkResponse(rsp *http.Response) (*CreateMagicLinkResponse, error)
ParseCreateMagicLinkResponse parses an HTTP response from a CreateMagicLinkWithResponse call
func (CreateMagicLinkResponse) Status ¶
func (r CreateMagicLinkResponse) Status() string
Status returns HTTPResponse.Status
func (CreateMagicLinkResponse) StatusCode ¶
func (r CreateMagicLinkResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateUserArgs ¶
type CreateUserArgs struct { // Email Email of the new user. Either this or `phone` is required; both may be provided. Email string `json:"email,omitempty"` // Phone Phone number of the new user. Either this or `email` is required; both may be provided. Phone string `json:"phone,omitempty"` UserMetadata map[string]interface{} `json:"user_metadata,omitempty"` }
CreateUserArgs defines model for CreateUserRequest.
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody = CreateUserArgs
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserResponse ¶
type CreateUserResponse struct { Body []byte HTTPResponse *http.Response JSON201 *UserResponse JSON400 *N400Error JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseCreateUserResponse ¶
func ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error)
ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call
func (CreateUserResponse) Status ¶
func (r CreateUserResponse) Status() string
Status returns HTTPResponse.Status
func (CreateUserResponse) StatusCode ¶
func (r CreateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeactivateUserResponse ¶
type DeactivateUserResponse struct { Body []byte HTTPResponse *http.Response JSON200 *UserResponse JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseDeactivateUserResponse ¶
func ParseDeactivateUserResponse(rsp *http.Response) (*DeactivateUserResponse, error)
ParseDeactivateUserResponse parses an HTTP response from a DeactivateUserWithResponse call
func (DeactivateUserResponse) Status ¶
func (r DeactivateUserResponse) Status() string
Status returns HTTPResponse.Status
func (DeactivateUserResponse) StatusCode ¶
func (r DeactivateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteUserDevicesResponse ¶
type DeleteUserDevicesResponse struct { Body []byte HTTPResponse *http.Response JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseDeleteUserDevicesResponse ¶
func ParseDeleteUserDevicesResponse(rsp *http.Response) (*DeleteUserDevicesResponse, error)
ParseDeleteUserDevicesResponse parses an HTTP response from a DeleteUserDevicesWithResponse call
func (DeleteUserDevicesResponse) Status ¶
func (r DeleteUserDevicesResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteUserDevicesResponse) StatusCode ¶
func (r DeleteUserDevicesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteUserResponse ¶
type DeleteUserResponse struct { Body []byte HTTPResponse *http.Response JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseDeleteUserResponse ¶
func ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error)
ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse call
func (DeleteUserResponse) Status ¶
func (r DeleteUserResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteUserResponse) StatusCode ¶
func (r DeleteUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetUserResponse ¶
type GetUserResponse struct { Body []byte HTTPResponse *http.Response JSON200 *UserResponse JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseGetUserResponse ¶
func ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error)
ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call
func (GetUserResponse) Status ¶
func (r GetUserResponse) Status() string
Status returns HTTPResponse.Status
func (GetUserResponse) StatusCode ¶
func (r GetUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GithubUserSocialConnection ¶
type GithubUserSocialConnection struct { CreatedAt time.Time `json:"created_at"` LastLoginAt time.Time `json:"last_login_at"` // ProviderID The external ID of the Social Connection. ProviderID string `json:"provider_id"` // ProviderIdentifier The email of connected social user. ProviderIdentifier string `json:"provider_identifier"` }
GithubUserSocialConnection defines model for GithubUserSocialConnection.
type GoogleUserSocialConnection ¶
type GoogleUserSocialConnection struct { CreatedAt time.Time `json:"created_at"` LastLoginAt time.Time `json:"last_login_at"` // ProviderID The external ID of the Social Connection. ProviderID string `json:"provider_id"` // ProviderIdentifier The email of connected social user. ProviderIdentifier string `json:"provider_identifier"` }
GoogleUserSocialConnection defines model for GoogleUserSocialConnection.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListDevicesResponse ¶
type ListDevicesResponse struct {
Devices []WebAuthnDevices `json:"devices"`
}
ListDevicesResponse defines model for ListDevicesResponse.
type ListPaginatedUsersItem ¶
type ListPaginatedUsersItem struct { CreatedAt time.Time `json:"created_at"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` // ExternalID The external ID of the user. Only set if the user was created in a Flex app. ExternalID string `json:"external_id"` ID string `json:"id"` LastLoginAt time.Time `json:"last_login_at"` LoginCount int `json:"login_count"` Phone string `json:"phone"` PhoneVerified bool `json:"phone_verified"` Status UserStatus `json:"status"` UpdatedAt time.Time `json:"updated_at"` UserMetadata *map[string]interface{} `json:"user_metadata"` }
ListPaginatedUsersItem defines model for ListPaginatedUsersItem.
type ListPaginatedUsersParams ¶
type ListPaginatedUsersParams struct { // Page page to fetch (min=1) Page *int `form:"page,omitempty" json:"page,omitempty"` // Limit number of users to fetch per page (max=500) Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // CreatedBefore Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) CreatedBefore *int `form:"created_before,omitempty" json:"created_before,omitempty"` // OrderBy Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` OrderBy *string `form:"order_by,omitempty" json:"order_by,omitempty"` // Identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) Identifier *string `form:"identifier,omitempty" json:"identifier,omitempty"` // ID search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) ID *string `form:"id,omitempty" json:"id,omitempty"` // LoginCount search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) LoginCount *int `form:"login_count,omitempty" json:"login_count,omitempty"` // Status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) Status *string `form:"status,omitempty" json:"status,omitempty"` // CreatedAt search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty"` // UpdatedAt search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty"` // LastLoginAt search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required LastLoginAt *string `form:"last_login_at,omitempty" json:"last_login_at,omitempty"` }
ListPaginatedUsersParams defines parameters for ListPaginatedUsers.
type ListPaginatedUsersResponse ¶
type ListPaginatedUsersResponse struct { Body []byte HTTPResponse *http.Response JSON200 *paginatedUsersResponse JSON400 *N400Error JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseListPaginatedUsersResponse ¶
func ParseListPaginatedUsersResponse(rsp *http.Response) (*ListPaginatedUsersResponse, error)
ParseListPaginatedUsersResponse parses an HTTP response from a ListPaginatedUsersWithResponse call
func (ListPaginatedUsersResponse) Status ¶
func (r ListPaginatedUsersResponse) Status() string
Status returns HTTPResponse.Status
func (ListPaginatedUsersResponse) StatusCode ¶
func (r ListPaginatedUsersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListUserDevicesResponse ¶
type ListUserDevicesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ListDevicesResponse JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseListUserDevicesResponse ¶
func ParseListUserDevicesResponse(rsp *http.Response) (*ListUserDevicesResponse, error)
ParseListUserDevicesResponse parses an HTTP response from a ListUserDevicesWithResponse call
func (ListUserDevicesResponse) Status ¶
func (r ListUserDevicesResponse) Status() string
Status returns HTTPResponse.Status
func (ListUserDevicesResponse) StatusCode ¶
func (r ListUserDevicesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MagicLink ¶
type MagicLink struct { Activated bool `json:"activated"` AppID string `json:"app_id"` ID string `json:"id"` Identifier string `json:"identifier"` RedirectURL string `json:"redirect_url"` Secret string `json:"secret"` // TTL time to live in minutes TTL int `json:"ttl"` // Type The type of magic link to create: "login" or "verify_identifier". Defaults to "login". Type MagicLinkType `json:"type"` URL string `json:"url"` UserID string `json:"user_id"` }
MagicLink defines model for MagicLink.
type MagicLinkLanguage ¶
type MagicLinkLanguage string
MagicLinkLanguage language of the email or sms to send
const ( De MagicLinkLanguage = "de" En MagicLinkLanguage = "en" Es MagicLinkLanguage = "es" It MagicLinkLanguage = "it" Pl MagicLinkLanguage = "pl" Pt MagicLinkLanguage = "pt" Zh MagicLinkLanguage = "zh" )
Defines values for MagicLinkLanguage.
type MagicLinkOptions ¶
type MagicLinkOptions struct { Language MagicLinkLanguage MagicLinkPath string RedirectURL string TTL int }
type MagicLinkResponse ¶
type MagicLinkResponse struct {
MagicLink MagicLink `json:"magic_link"`
}
MagicLinkResponse defines model for MagicLinkResponse.
type MagicLinkType ¶
type MagicLinkType string
MagicLinkType The type of magic link to create: "login" or "verify_identifier". Defaults to "login".
const ( LoginType MagicLinkType = "login" VerifyIdentifierType MagicLinkType = "verify_identifier" )
Defines values for MagicLinkType.
type N400BadRequest ¶
type N400BadRequest = N400Error
N400BadRequest defines model for 400BadRequest.
type N400Error ¶
type N400Error struct { Code N400ErrorCode `json:"code"` Error string `json:"error"` }
N400Error defines model for 400Error.
type N400ErrorCode ¶
type N400ErrorCode string
N400ErrorCode defines model for 400Error.Code.
const ( CustomProviderRequired N400ErrorCode = "custom_provider_required" InvalidRequest N400ErrorCode = "invalid_request" )
Defines values for N400ErrorCode.
type N401Error ¶
type N401Error struct { Code N401ErrorCode `json:"code"` Error string `json:"error"` }
N401Error defines model for 401Error.
type N401ErrorCode ¶
type N401ErrorCode string
N401ErrorCode defines model for 401Error.Code.
const ( InvalidAccessToken N401ErrorCode = "invalid_access_token" InvalidNonce N401ErrorCode = "invalid_nonce" )
Defines values for N401ErrorCode.
type N401Unauthorized ¶
type N401Unauthorized = N401Error
N401Unauthorized defines model for 401Unauthorized.
type N403Error ¶
type N403Error struct { Code N403ErrorCode `json:"code"` Error string `json:"error"` }
N403Error defines model for 403Error.
type N403ErrorCode ¶
type N403ErrorCode string
N403ErrorCode defines model for 403Error.Code.
const ( CannotCreateOrganizationBillingPortalSession N403ErrorCode = "cannot_create_organization_billing_portal_session" CannotCreateTransaction N403ErrorCode = "cannot_create_transaction" CannotDeleteAdmin N403ErrorCode = "cannot_delete_admin" CannotDeleteOrganizationMember N403ErrorCode = "cannot_delete_organization_member" CannotSelfUpdateOrganizationMember N403ErrorCode = "cannot_self_update_organization_member" OperationNotAllowed N403ErrorCode = "operation_not_allowed" )
Defines values for N403ErrorCode.
type N404Error ¶
type N404Error struct { Code N404ErrorCode `json:"code"` Error string `json:"error"` }
N404Error defines model for 404Error.
type N404ErrorCode ¶
type N404ErrorCode string
N404ErrorCode defines model for 404Error.Code.
const ( APIKeyNotFound N404ErrorCode = "api_key_not_found" AdminNotFound N404ErrorCode = "admin_not_found" AppNotFound N404ErrorCode = "app_not_found" DeviceNotFound N404ErrorCode = "device_not_found" DomainNotFound N404ErrorCode = "domain_not_found" EmailProviderNotFound N404ErrorCode = "email_provider_not_found" EmailTemplateNotFound N404ErrorCode = "email_template_not_found" EventNotFound N404ErrorCode = "event_not_found" FunctionNotFound N404ErrorCode = "function_not_found" FunctionSecretKeyNotFound N404ErrorCode = "function_secret_key_not_found" FunctionVersionNotFound N404ErrorCode = "function_version_not_found" MetadataFieldNotFound N404ErrorCode = "metadata_field_not_found" NativeClientNotFound N404ErrorCode = "native_client_not_found" Oauth2AppNotFound N404ErrorCode = "oauth2_app_not_found" OrganizationMemberNotFound N404ErrorCode = "organization_member_not_found" SmsProviderNotFound N404ErrorCode = "sms_provider_not_found" SmsTemplateNotFound N404ErrorCode = "sms_template_not_found" SocialConnectionNotFound N404ErrorCode = "social_connection_not_found" UserNotFound N404ErrorCode = "user_not_found" )
Defines values for N404ErrorCode.
type N500Error ¶
type N500Error struct { Code N500ErrorCode `json:"code"` Error string `json:"error"` }
N500Error defines model for 500Error.
type N500ErrorCode ¶
type N500ErrorCode string
N500ErrorCode defines model for 500Error.Code.
const (
InternalServerError N500ErrorCode = "internal_server_error"
)
Defines values for N500ErrorCode.
type N500InternalServerError ¶
type N500InternalServerError = N500Error
N500InternalServerError defines model for 500InternalServerError.
type PaginatedLinks ¶
type PaginatedLinks struct { First Link `json:"first"` Last Link `json:"last"` Next Link `json:"next"` Previous Link `json:"previous"` Self Link `json:"self"` }
PaginatedLinks defines model for PaginatedLinks.
type PassageError ¶
func (PassageError) Error ¶
func (e PassageError) Error() string
type PassageUser ¶
type PassageUser struct { CreatedAt time.Time `json:"created_at"` Email string `json:"email"` EmailVerified bool `json:"email_verified"` // ExternalID The external ID of the user. Only set if the user was created in a Flex app. ExternalID string `json:"external_id"` ID string `json:"id"` LastLoginAt time.Time `json:"last_login_at"` LoginCount int `json:"login_count"` Phone string `json:"phone"` PhoneVerified bool `json:"phone_verified"` RecentEvents []UserRecentEvent `json:"recent_events"` SocialConnections UserSocialConnections `json:"social_connections"` Status UserStatus `json:"status"` UpdatedAt time.Time `json:"updated_at"` UserMetadata map[string]interface{} `json:"user_metadata"` Webauthn bool `json:"webauthn"` WebauthnDevices []WebAuthnDevices `json:"webauthn_devices"` // WebauthnTypes List of credential types that have been used for authentication WebauthnTypes []WebAuthnType `json:"webauthn_types"` }
PassageUser defines model for UserInfo.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RevokeUserRefreshTokensResponse ¶
type RevokeUserRefreshTokensResponse struct { Body []byte HTTPResponse *http.Response JSON401 *N401Error JSON403 *N403Forbidden JSON404 *N404Error JSON500 *N500Error }
func ParseRevokeUserRefreshTokensResponse ¶
func ParseRevokeUserRefreshTokensResponse(rsp *http.Response) (*RevokeUserRefreshTokensResponse, error)
ParseRevokeUserRefreshTokensResponse parses an HTTP response from a RevokeUserRefreshTokensWithResponse call
func (RevokeUserRefreshTokensResponse) Status ¶
func (r RevokeUserRefreshTokensResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeUserRefreshTokensResponse) StatusCode ¶
func (r RevokeUserRefreshTokensResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SocialConnectionType ¶
type SocialConnectionType string
SocialConnectionType defines model for SocialConnectionType.
const ( Apple SocialConnectionType = "apple" Github SocialConnectionType = "github" Google SocialConnectionType = "google" )
Defines values for SocialConnectionType.
type UpdateUserJSONRequestBody ¶
type UpdateUserJSONRequestBody = UpdateUserOptions
UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
type UpdateUserOptions ¶
type UpdateUserOptions struct { Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` UserMetadata map[string]interface{} `json:"user_metadata,omitempty"` }
UpdateUserOptions defines model for UpdateUserRequest.
type UpdateUserResponse ¶
type UpdateUserResponse struct { Body []byte HTTPResponse *http.Response JSON200 *UserResponse JSON400 *N400Error JSON401 *N401Error JSON404 *N404Error JSON500 *N500Error }
func ParseUpdateUserResponse ¶
func ParseUpdateUserResponse(rsp *http.Response) (*UpdateUserResponse, error)
ParseUpdateUserResponse parses an HTTP response from a UpdateUserWithResponse call
func (UpdateUserResponse) Status ¶
func (r UpdateUserResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateUserResponse) StatusCode ¶
func (r UpdateUserResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type User ¶ added in v2.1.0
type User struct {
// contains filtered or unexported fields
}
func (*User) Activate ¶ added in v2.1.0
func (u *User) Activate(userID string) (*PassageUser, error)
Activate activates a user using their user ID.
func (*User) Create ¶ added in v2.1.0
func (u *User) Create(args CreateUserArgs) (*PassageUser, error)
Create creates a user.
func (*User) Deactivate ¶ added in v2.1.0
func (u *User) Deactivate(userID string) (*PassageUser, error)
Deactivate deactivates a user using their user ID.
func (*User) Get ¶ added in v2.1.0
func (u *User) Get(userID string) (*PassageUser, error)
Get retrieves a user's object using their user ID.
func (*User) GetByIdentifier ¶ added in v2.1.0
func (u *User) GetByIdentifier(identifier string) (*PassageUser, error)
GetByIdentifier retrieves a user's object using their user identifier.
func (*User) ListDevices ¶ added in v2.1.0
func (u *User) ListDevices(userID string) ([]WebAuthnDevices, error)
ListDevices retrieves a user's webauthn devices using their user ID.
func (*User) RevokeDevice ¶ added in v2.1.0
RevokeDevice revokes user's webauthn device using their user ID and the device ID.
func (*User) RevokeRefreshTokens ¶ added in v2.1.0
RevokeRefreshTokens revokes all of a user's Refresh Tokens using their User ID.
func (*User) Update ¶ added in v2.1.0
func (u *User) Update(userID string, options UpdateUserOptions) (*PassageUser, error)
Update updates a user.
type UserEventAction ¶
type UserEventAction string
UserEventAction defines model for UserEventAction.
const ( UserEventActionLogin UserEventAction = "login" UserEventActionOther UserEventAction = "other" UserEventActionRegister UserEventAction = "register" )
Defines values for UserEventAction.
type UserEventStatus ¶
type UserEventStatus string
UserEventStatus defines model for UserEventStatus.
const ( Complete UserEventStatus = "complete" Incomplete UserEventStatus = "incomplete" )
Defines values for UserEventStatus.
type UserRecentEvent ¶
type UserRecentEvent struct { Action UserEventAction `json:"action"` CompletedAt *time.Time `json:"completed_at"` CreatedAt time.Time `json:"created_at"` ID string `json:"id"` IPAddr string `json:"ip_addr"` SocialLoginType *SocialConnectionType `json:"social_login_type"` Status UserEventStatus `json:"status"` Type string `json:"type"` // UserAgent The raw user agent value from the originating device UserAgent string `json:"user_agent"` // UserAgentDisplay A display-friendly version of the user agent UserAgentDisplay string `json:"user_agent_display"` }
UserRecentEvent defines model for UserRecentEvent.
type UserResponse ¶
type UserResponse struct {
PassageUser PassageUser `json:"user"`
}
UserResponse defines model for UserResponse.
type UserSocialConnections ¶
type UserSocialConnections struct { Apple *AppleUserSocialConnection `json:"apple,omitempty"` Github *GithubUserSocialConnection `json:"github,omitempty"` Google *GoogleUserSocialConnection `json:"google,omitempty"` }
UserSocialConnections defines model for UserSocialConnections.
type UserStatus ¶
type UserStatus string
UserStatus defines model for UserStatus.
const ( StatusActive UserStatus = "active" StatusInactive UserStatus = "inactive" StatusPending UserStatus = "pending" )
Defines values for UserStatus.
type WebAuthnDevices ¶
type WebAuthnDevices struct { // CreatedAt The first time this webAuthn device was used to authenticate the user CreatedAt time.Time `json:"created_at"` // CredID The CredID for this webAuthn device CredID string `json:"cred_id"` // FriendlyName The friendly name for the webAuthn device used to authenticate FriendlyName string `json:"friendly_name"` // Icons Contains the light and dark SVG icons that represent the brand of those devices // Values can be null or base64 encoded SVG. Example of SVG output: // data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDE5MiAxOTIiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDE5MiAxOTIiIHdpZHRoPSIyNHB4Ij48cmVjdCBmaWxsPSJub25lIiBoZWlnaHQ9IjE5MiIgd2lkdGg9IjE5MiIgeT0iMCIvPjxnPjxwYXRoIGQ9Ik02OS4yOSwxMDZjLTMuNDYsNS45Ny05LjkxLDEwLTE3LjI5LDEwYy0xMS4wMywwLTIwLTguOTctMjAtMjBzOC45Ny0yMCwyMC0yMCBjNy4zOCwwLDEzLjgzLDQuMDMsMTcuMjksMTBoMjUuNTVDOTAuMyw2Ni41NCw3Mi44Miw1Miw1Miw1MkMyNy43NCw1Miw4LDcxLjc0LDgsOTZzMTkuNzQsNDQsNDQsNDRjMjAuODIsMCwzOC4zLTE0LjU0LDQyLjg0LTM0IEg2OS4yOXoiIGZpbGw9IiM0Mjg1RjQiLz48cmVjdCBmaWxsPSIjRkJCQzA0IiBoZWlnaHQ9IjI0IiB3aWR0aD0iNDQiIHg9Ijk0IiB5PSI4NCIvPjxwYXRoIGQ9Ik05NC4zMiw4NEg2OHYwLjA1YzIuNSwzLjM0LDQsNy40Nyw0LDExLjk1cy0xLjUsOC42MS00LDExLjk1VjEwOGgyNi4zMiBjMS4wOC0zLjgyLDEuNjgtNy44NCwxLjY4LTEyUzk1LjQxLDg3LjgyLDk0LjMyLDg0eiIgZmlsbD0iI0VBNDMzNSIvPjxwYXRoIGQ9Ik0xODQsMTA2djI2aC0xNnYtOGMwLTQuNDItMy41OC04LTgtOHMtOCwzLjU4LTgsOHY4aC0xNnYtMjZIMTg0eiIgZmlsbD0iIzM0QTg1MyIvPjxyZWN0IGZpbGw9IiMxODgwMzgiIGhlaWdodD0iMjQiIHdpZHRoPSI0OCIgeD0iMTM2IiB5PSI4NCIvPjwvZz48L3N2Zz4= Icons WebAuthnIcons `json:"icons"` // ID The ID of the webAuthn device used for authentication ID string `json:"id"` // LastLoginAt The last time this webAuthn device was used to authenticate the user LastLoginAt time.Time `json:"last_login_at"` // Type The type of this credential Type WebAuthnType `json:"type"` // UpdatedAt The last time this webAuthn device was updated UpdatedAt time.Time `json:"updated_at"` // UsageCount How many times this webAuthn device has been used to authenticate the user UsageCount int `json:"usage_count"` }
WebAuthnDevices defines model for WebAuthnDevices.
type WebAuthnIcons ¶
WebAuthnIcons Contains the light and dark SVG icons that represent the brand of those devices Values can be null or base64 encoded SVG. Example of SVG output: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDE5MiAxOTIiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDE5MiAxOTIiIHdpZHRoPSIyNHB4Ij48cmVjdCBmaWxsPSJub25lIiBoZWlnaHQ9IjE5MiIgd2lkdGg9IjE5MiIgeT0iMCIvPjxnPjxwYXRoIGQ9Ik02OS4yOSwxMDZjLTMuNDYsNS45Ny05LjkxLDEwLTE3LjI5LDEwYy0xMS4wMywwLTIwLTguOTctMjAtMjBzOC45Ny0yMCwyMC0yMCBjNy4zOCwwLDEzLjgzLDQuMDMsMTcuMjksMTBoMjUuNTVDOTAuMyw2Ni41NCw3Mi44Miw1Miw1Miw1MkMyNy43NCw1Miw4LDcxLjc0LDgsOTZzMTkuNzQsNDQsNDQsNDRjMjAuODIsMCwzOC4zLTE0LjU0LDQyLjg0LTM0IEg2OS4yOXoiIGZpbGw9IiM0Mjg1RjQiLz48cmVjdCBmaWxsPSIjRkJCQzA0IiBoZWlnaHQ9IjI0IiB3aWR0aD0iNDQiIHg9Ijk0IiB5PSI4NCIvPjxwYXRoIGQ9Ik05NC4zMiw4NEg2OHYwLjA1YzIuNSwzLjM0LDQsNy40Nyw0LDExLjk1cy0xLjUsOC42MS00LDExLjk1VjEwOGgyNi4zMiBjMS4wOC0zLjgyLDEuNjgtNy44NCwxLjY4LTEyUzk1LjQxLDg3LjgyLDk0LjMyLDg0eiIgZmlsbD0iI0VBNDMzNSIvPjxwYXRoIGQ9Ik0xODQsMTA2djI2aC0xNnYtOGMwLTQuNDItMy41OC04LTgtOHMtOCwzLjU4LTgsOHY4aC0xNnYtMjZIMTg0eiIgZmlsbD0iIzM0QTg1MyIvPjxyZWN0IGZpbGw9IiMxODgwMzgiIGhlaWdodD0iMjQiIHdpZHRoPSI0OCIgeD0iMTM2IiB5PSI4NCIvPjwvZz48L3N2Zz4=
type WebAuthnType ¶
type WebAuthnType string
WebAuthnType The type of this credential
const ( Passkey WebAuthnType = "passkey" Platform WebAuthnType = "platform" SecurityKey WebAuthnType = "security_key" )
Defines values for WebAuthnType.