Documentation
¶
Index ¶
- type ChildCreateRequest
- type ChildCreateResponse
- type Client
- func (c *Client) ChildCreate(ctx context.Context, req *ChildCreateRequest) (*ChildCreateResponse, error)
- func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (c *Client) DeleteTfaId(ctx context.Context, req *DeleteTfaIdRequest) (*DeleteTfaIdResponse, error)
- func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
- func (c *Client) GetTfaEntryId(ctx context.Context, req *GetTfaEntryIdRequest) (*GetTfaEntryIdResponse, error)
- func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
- func (c *Client) UpdateTfaEntryId(ctx context.Context, req *UpdateTfaEntryIdRequest) (*UpdateTfaEntryIdResponse, error)
- type CreateRequest
- type CreateResponse
- type DeleteTfaIdRequest
- type DeleteTfaIdResponse
- type FindRequest
- type FindResponse
- type GetTfaEntryIdRequest
- type GetTfaEntryIdResponse
- type HTTPClient
- type IndexResponse
- type UpdateTfaEntryIdRequest
- type UpdateTfaEntryIdResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildCreateRequest ¶
type ChildCreateRequest struct { Type string `url:"type",json:"type"` // TFA Entry Type. Userid string `url:"userid",json:"userid"` // User ID // The following parameters are optional Challenge *string `url:"challenge,omitempty",json:"challenge,omitempty"` // When responding to a u2f challenge: the original challenge string Description *string `url:"description,omitempty",json:"description,omitempty"` // A description to distinguish multiple entries from one another Password *string `url:"password,omitempty",json:"password,omitempty"` // The current password. Totp *string `url:"totp,omitempty",json:"totp,omitempty"` // A totp URI. Value *string `url:"value,omitempty",json:"value,omitempty"` // The current value for the provided totp URI, or a Webauthn/U2F challenge response }
type ChildCreateResponse ¶
type ChildCreateResponse struct { Id string `url:"id",json:"id"` // The id of a newly added TFA entry. // The following parameters are optional Challenge *string `url:"challenge,omitempty",json:"challenge,omitempty"` // When adding u2f entries, this contains a challenge the user must respond to in order to finish the registration. Recovery []string `url:"recovery,omitempty",json:"recovery,omitempty"` // When adding recovery codes, this contains the list of codes to be displayed to the user }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) ChildCreate ¶
func (c *Client) ChildCreate(ctx context.Context, req *ChildCreateRequest) (*ChildCreateResponse, error)
ChildCreate Add a TFA entry for a user.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
Create Finish a u2f challenge.
func (*Client) DeleteTfaId ¶
func (c *Client) DeleteTfaId(ctx context.Context, req *DeleteTfaIdRequest) (*DeleteTfaIdResponse, error)
DeleteTfaId Delete a TFA entry by ID.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
Find List TFA configurations of users.
func (*Client) GetTfaEntryId ¶
func (c *Client) GetTfaEntryId(ctx context.Context, req *GetTfaEntryIdRequest) (*GetTfaEntryIdResponse, error)
GetTfaEntryId Fetch a requested TFA entry if present.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
Index List TFA configurations of users.
func (*Client) UpdateTfaEntryId ¶
func (c *Client) UpdateTfaEntryId(ctx context.Context, req *UpdateTfaEntryIdRequest) (*UpdateTfaEntryIdResponse, error)
UpdateTfaEntryId Add a TFA entry for a user.
type CreateRequest ¶
type CreateRequest struct {
Response string `url:"response",json:"response"` // The response to the current authentication challenge.
}
type CreateResponse ¶
type CreateResponse struct {
Ticket string `url:"ticket",json:"ticket"`
}
type DeleteTfaIdRequest ¶
type DeleteTfaIdResponse ¶
type DeleteTfaIdResponse map[string]interface{}
type FindRequest ¶
type FindRequest struct {
Userid string `url:"userid",json:"userid"` // User ID
}
type FindResponse ¶
type FindResponse []*struct { Created int `url:"created",json:"created"` // Creation time of this entry as unix epoch. Description string `url:"description",json:"description"` // User chosen description for this entry. Id string `url:"id",json:"id"` // The id used to reference this entry. Type string `url:"type",json:"type"` // TFA Entry Type. // The following parameters are optional Enable *util.SpecialBool `url:"enable,omitempty",json:"enable,omitempty"` // Whether this TFA entry is currently enabled. }
type GetTfaEntryIdRequest ¶
type GetTfaEntryIdResponse ¶
type GetTfaEntryIdResponse struct { Created int `url:"created",json:"created"` // Creation time of this entry as unix epoch. Description string `url:"description",json:"description"` // User chosen description for this entry. Id string `url:"id",json:"id"` // The id used to reference this entry. Type string `url:"type",json:"type"` // TFA Entry Type. // The following parameters are optional Enable *util.SpecialBool `url:"enable,omitempty",json:"enable,omitempty"` // Whether this TFA entry is currently enabled. }
type HTTPClient ¶
type IndexResponse ¶
type IndexResponse []*struct { Entries []*struct { Created int `url:"created",json:"created"` // Creation time of this entry as unix epoch. Description string `url:"description",json:"description"` // User chosen description for this entry. Id string `url:"id",json:"id"` // The id used to reference this entry. Type string `url:"type",json:"type"` // TFA Entry Type. // The following parameters are optional Enable *util.SpecialBool `url:"enable,omitempty",json:"enable,omitempty"` // Whether this TFA entry is currently enabled. } `url:"entries",json:"entries"` Userid string `url:"userid",json:"userid"` // User this entry belongs to. }
type UpdateTfaEntryIdRequest ¶
type UpdateTfaEntryIdRequest struct { Id string `url:"id",json:"id"` // A TFA entry id. Userid string `url:"userid",json:"userid"` // User ID // The following parameters are optional Description *string `url:"description,omitempty",json:"description,omitempty"` // A description to distinguish multiple entries from one another Enable *util.SpecialBool `url:"enable,omitempty",json:"enable,omitempty"` // Whether the entry should be enabled for login. Password *string `url:"password,omitempty",json:"password,omitempty"` // The current password. }
type UpdateTfaEntryIdResponse ¶
type UpdateTfaEntryIdResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.