Documentation
¶
Overview ¶
Package auth provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- Constants
- func NewDeleteDeviceRequest(server string, id string, params *DeleteDeviceParams) (*http.Request, error)
- func NewGetAttestedKeyConfigRequest(server string) (*http.Request, error)
- func NewGetAuthorizeRequest(server string, params *GetAuthorizeParams) (*http.Request, error)
- func NewGetChallengeRequest(server string) (*http.Request, error)
- func NewGetDeviceRequest(server string, id string, params *GetDeviceParams) (*http.Request, error)
- func NewGetJWKSRequest(server string) (*http.Request, error)
- func NewGetMeRequest(server string, params *GetMeParams) (*http.Request, error)
- func NewGetOpenidConfigurationRequest(server string) (*http.Request, error)
- func NewGetPairingStatusRequest(server string, params *GetPairingStatusParams) (*http.Request, error)
- func NewListDevicesRequest(server string, params *ListDevicesParams) (*http.Request, error)
- func NewListPairingsRequest(server string, params *ListPairingsParams) (*http.Request, error)
- func NewPostDeviceAuthorizationRequest(server string, params *PostDeviceAuthorizationParams, ...) (*http.Request, error)
- func NewPostDeviceAuthorizationRequestWithBody(server string, params *PostDeviceAuthorizationParams, contentType string, ...) (*http.Request, error)
- func NewPostDeviceAuthorizationRequestWithFormdataBody(server string, params *PostDeviceAuthorizationParams, ...) (*http.Request, error)
- func NewPostPairingConfirmRequest(server string, params *PostPairingConfirmParams, ...) (*http.Request, error)
- func NewPostPairingConfirmRequestWithBody(server string, params *PostPairingConfirmParams, contentType string, ...) (*http.Request, error)
- func NewPostPairingPubkeyRequest(server string, params *PostPairingPubkeyParams, ...) (*http.Request, error)
- func NewPostPairingPubkeyRequestWithBody(server string, params *PostPairingPubkeyParams, contentType string, ...) (*http.Request, error)
- func NewPostRegisterRequest(server string, body PostRegisterJSONRequestBody) (*http.Request, error)
- func NewPostRegisterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostReloginRequest(server string, body PostReloginJSONRequestBody) (*http.Request, error)
- func NewPostReloginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostTokenRequestWithBody(server string, params *PostTokenParams, contentType string, body io.Reader) (*http.Request, error)
- func NewPostTokenRequestWithFormdataBody(server string, params *PostTokenParams, body PostTokenFormdataRequestBody) (*http.Request, error)
- func NewRefreshAttestedKeyRequest(server string, params *RefreshAttestedKeyParams) (*http.Request, error)
- func NewRevokePairingRequest(server string, id string, params *RevokePairingParams) (*http.Request, error)
- type AttestedKeyCertificate
- type AttestedKeyConfig
- type AttestedKeyIssuerKey
- type BadRequest
- type ChallengeResponse
- type Client
- func (c *Client) DeleteDevice(ctx context.Context, id string, params *DeleteDeviceParams, ...) (*http.Response, error)
- func (c *Client) GetAttestedKeyConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAuthorize(ctx context.Context, params *GetAuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetChallenge(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetDevice(ctx context.Context, id string, params *GetDeviceParams, ...) (*http.Response, error)
- func (c *Client) GetJWKS(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetMe(ctx context.Context, params *GetMeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetOpenidConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetPairingStatus(ctx context.Context, params *GetPairingStatusParams, ...) (*http.Response, error)
- func (c *Client) ListDevices(ctx context.Context, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListPairings(ctx context.Context, params *ListPairingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostDeviceAuthorization(ctx context.Context, params *PostDeviceAuthorizationParams, ...) (*http.Response, error)
- func (c *Client) PostDeviceAuthorizationWithBody(ctx context.Context, params *PostDeviceAuthorizationParams, contentType string, ...) (*http.Response, error)
- func (c *Client) PostDeviceAuthorizationWithFormdataBody(ctx context.Context, params *PostDeviceAuthorizationParams, ...) (*http.Response, error)
- func (c *Client) PostPairingConfirm(ctx context.Context, params *PostPairingConfirmParams, ...) (*http.Response, error)
- func (c *Client) PostPairingConfirmWithBody(ctx context.Context, params *PostPairingConfirmParams, contentType string, ...) (*http.Response, error)
- func (c *Client) PostPairingPubkey(ctx context.Context, params *PostPairingPubkeyParams, ...) (*http.Response, error)
- func (c *Client) PostPairingPubkeyWithBody(ctx context.Context, params *PostPairingPubkeyParams, contentType string, ...) (*http.Response, error)
- func (c *Client) PostRegister(ctx context.Context, body PostRegisterJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostRegisterWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostRelogin(ctx context.Context, body PostReloginJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostReloginWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostTokenWithBody(ctx context.Context, params *PostTokenParams, contentType string, ...) (*http.Response, error)
- func (c *Client) PostTokenWithFormdataBody(ctx context.Context, params *PostTokenParams, ...) (*http.Response, error)
- func (c *Client) RefreshAttestedKey(ctx context.Context, params *RefreshAttestedKeyParams, ...) (*http.Response, error)
- func (c *Client) RevokePairing(ctx context.Context, id string, params *RevokePairingParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteDeviceWithResponse(ctx context.Context, id string, params *DeleteDeviceParams, ...) (*DeleteDeviceResp, error)
- func (c *ClientWithResponses) GetAttestedKeyConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAttestedKeyConfigResp, error)
- func (c *ClientWithResponses) GetAuthorizeWithResponse(ctx context.Context, params *GetAuthorizeParams, reqEditors ...RequestEditorFn) (*GetAuthorizeResp, error)
- func (c *ClientWithResponses) GetChallengeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetChallengeResp, error)
- func (c *ClientWithResponses) GetDeviceWithResponse(ctx context.Context, id string, params *GetDeviceParams, ...) (*GetDeviceResp, error)
- func (c *ClientWithResponses) GetJWKSWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJWKSResp, error)
- func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, params *GetMeParams, reqEditors ...RequestEditorFn) (*GetMeResp, error)
- func (c *ClientWithResponses) GetOpenidConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenidConfigurationResp, error)
- func (c *ClientWithResponses) GetPairingStatusWithResponse(ctx context.Context, params *GetPairingStatusParams, ...) (*GetPairingStatusResp, error)
- func (c *ClientWithResponses) ListDevicesWithResponse(ctx context.Context, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*ListDevicesResp, error)
- func (c *ClientWithResponses) ListPairingsWithResponse(ctx context.Context, params *ListPairingsParams, reqEditors ...RequestEditorFn) (*ListPairingsResp, error)
- func (c *ClientWithResponses) PostDeviceAuthorizationWithBodyWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, contentType string, ...) (*PostDeviceAuthorizationResp, error)
- func (c *ClientWithResponses) PostDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, ...) (*PostDeviceAuthorizationResp, error)
- func (c *ClientWithResponses) PostDeviceAuthorizationWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, ...) (*PostDeviceAuthorizationResp, error)
- func (c *ClientWithResponses) PostPairingConfirmWithBodyWithResponse(ctx context.Context, params *PostPairingConfirmParams, contentType string, ...) (*PostPairingConfirmResp, error)
- func (c *ClientWithResponses) PostPairingConfirmWithResponse(ctx context.Context, params *PostPairingConfirmParams, ...) (*PostPairingConfirmResp, error)
- func (c *ClientWithResponses) PostPairingPubkeyWithBodyWithResponse(ctx context.Context, params *PostPairingPubkeyParams, contentType string, ...) (*PostPairingPubkeyResp, error)
- func (c *ClientWithResponses) PostPairingPubkeyWithResponse(ctx context.Context, params *PostPairingPubkeyParams, ...) (*PostPairingPubkeyResp, error)
- func (c *ClientWithResponses) PostRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostRegisterResp, error)
- func (c *ClientWithResponses) PostRegisterWithResponse(ctx context.Context, body PostRegisterJSONRequestBody, ...) (*PostRegisterResp, error)
- func (c *ClientWithResponses) PostReloginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostReloginResp, error)
- func (c *ClientWithResponses) PostReloginWithResponse(ctx context.Context, body PostReloginJSONRequestBody, ...) (*PostReloginResp, error)
- func (c *ClientWithResponses) PostTokenWithBodyWithResponse(ctx context.Context, params *PostTokenParams, contentType string, ...) (*PostTokenResp, error)
- func (c *ClientWithResponses) PostTokenWithFormdataBodyWithResponse(ctx context.Context, params *PostTokenParams, ...) (*PostTokenResp, error)
- func (c *ClientWithResponses) RefreshAttestedKeyWithResponse(ctx context.Context, params *RefreshAttestedKeyParams, ...) (*RefreshAttestedKeyResp, error)
- func (c *ClientWithResponses) RevokePairingWithResponse(ctx context.Context, id string, params *RevokePairingParams, ...) (*RevokePairingResp, error)
- type ClientWithResponsesInterface
- type Conflict
- type DPoPHeader
- type DeleteDeviceParams
- type DeleteDeviceResp
- type Device
- type DeviceApnsEnvironment
- type DeviceAttestationType
- type DeviceAuthorizationRequest
- type DeviceAuthorizationResponse
- type DeviceDeviceType
- type DeviceList
- type Forbidden
- type GetAttestedKeyConfigResp
- type GetAuthorizeParams
- type GetAuthorizeParamsCodeChallengeMethod
- type GetAuthorizeParamsResponseType
- type GetAuthorizeResp
- type GetChallengeResp
- type GetDeviceParams
- type GetDeviceResp
- type GetJWKSResp
- type GetMeParams
- type GetMeResp
- type GetOpenidConfigurationResp
- type GetPairingStatusParams
- type GetPairingStatusResp
- type HttpRequestDoer
- type JWK
- type JWKKty
- type JWKS
- type ListDevicesParams
- type ListDevicesResp
- type ListPairingsParams
- type ListPairingsResp
- type MeResponse
- type NotFound
- type OAuthError
- type OpenIDConfiguration
- type Pairing
- type PairingConfirmRequest
- type PairingList
- type PairingPubkeyRequest
- type PairingPubkeyResponse
- type PairingStatus
- type PairingStatusResponse
- type PairingStatusResponseStatus
- type PostDeviceAuthorizationFormdataRequestBody
- type PostDeviceAuthorizationJSONRequestBody
- type PostDeviceAuthorizationParams
- type PostDeviceAuthorizationResp
- type PostPairingConfirmJSONRequestBody
- type PostPairingConfirmParams
- type PostPairingConfirmResp
- type PostPairingPubkeyJSONRequestBody
- type PostPairingPubkeyParams
- type PostPairingPubkeyResp
- type PostRegisterJSONRequestBody
- type PostRegisterResp
- type PostReloginJSONRequestBody
- type PostReloginResp
- type PostTokenFormdataRequestBody
- type PostTokenParams
- type PostTokenResp
- type ProblemDetails
- type RefreshAttestedKeyParams
- type RefreshAttestedKeyResp
- type RegisterRequest
- func (t RegisterRequest) AsRegisterRequestAndroid() (RegisterRequestAndroid, error)
- func (t RegisterRequest) AsRegisterRequestIOS() (RegisterRequestIOS, error)
- func (t RegisterRequest) Discriminator() (string, error)
- func (t *RegisterRequest) FromRegisterRequestAndroid(v RegisterRequestAndroid) error
- func (t *RegisterRequest) FromRegisterRequestIOS(v RegisterRequestIOS) error
- func (t RegisterRequest) MarshalJSON() ([]byte, error)
- func (t *RegisterRequest) MergeRegisterRequestAndroid(v RegisterRequestAndroid) error
- func (t *RegisterRequest) MergeRegisterRequestIOS(v RegisterRequestIOS) error
- func (t *RegisterRequest) UnmarshalJSON(b []byte) error
- func (t RegisterRequest) ValueByDiscriminator() (interface{}, error)
- type RegisterRequestAndroid
- type RegisterRequestAndroidAttestationType
- type RegisterRequestBase
- type RegisterRequestBaseAttestationType
- type RegisterRequestIOS
- type RegisterRequestIOSAttestationType
- type RegisterResponse
- type RegisterResponseTokenType
- type ReloginRequest
- type ReloginResponse
- type ReloginResponseTokenType
- type RequestEditorFn
- type RevokePairingParams
- type RevokePairingResp
- type TokenRequest
- type TokenRequestGrantType
- type TokenResponse
- type TokenResponseTokenType
- type TooManyRequests
- type Unauthorized
- type UnprocessableEntity
- type XRequestID
Constants ¶
const (
DpopAccessTokenScopes = "dpopAccessToken.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewDeleteDeviceRequest ¶
func NewDeleteDeviceRequest(server string, id string, params *DeleteDeviceParams) (*http.Request, error)
NewDeleteDeviceRequest generates requests for DeleteDevice
func NewGetAttestedKeyConfigRequest ¶
NewGetAttestedKeyConfigRequest generates requests for GetAttestedKeyConfig
func NewGetAuthorizeRequest ¶
func NewGetAuthorizeRequest(server string, params *GetAuthorizeParams) (*http.Request, error)
NewGetAuthorizeRequest generates requests for GetAuthorize
func NewGetChallengeRequest ¶
NewGetChallengeRequest generates requests for GetChallenge
func NewGetDeviceRequest ¶
NewGetDeviceRequest generates requests for GetDevice
func NewGetJWKSRequest ¶
NewGetJWKSRequest generates requests for GetJWKS
func NewGetMeRequest ¶
func NewGetMeRequest(server string, params *GetMeParams) (*http.Request, error)
NewGetMeRequest generates requests for GetMe
func NewGetOpenidConfigurationRequest ¶
NewGetOpenidConfigurationRequest generates requests for GetOpenidConfiguration
func NewGetPairingStatusRequest ¶
func NewGetPairingStatusRequest(server string, params *GetPairingStatusParams) (*http.Request, error)
NewGetPairingStatusRequest generates requests for GetPairingStatus
func NewListDevicesRequest ¶
func NewListDevicesRequest(server string, params *ListDevicesParams) (*http.Request, error)
NewListDevicesRequest generates requests for ListDevices
func NewListPairingsRequest ¶
func NewListPairingsRequest(server string, params *ListPairingsParams) (*http.Request, error)
NewListPairingsRequest generates requests for ListPairings
func NewPostDeviceAuthorizationRequest ¶
func NewPostDeviceAuthorizationRequest(server string, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationJSONRequestBody) (*http.Request, error)
NewPostDeviceAuthorizationRequest calls the generic PostDeviceAuthorization builder with application/json body
func NewPostDeviceAuthorizationRequestWithBody ¶
func NewPostDeviceAuthorizationRequestWithBody(server string, params *PostDeviceAuthorizationParams, contentType string, body io.Reader) (*http.Request, error)
NewPostDeviceAuthorizationRequestWithBody generates requests for PostDeviceAuthorization with any type of body
func NewPostDeviceAuthorizationRequestWithFormdataBody ¶
func NewPostDeviceAuthorizationRequestWithFormdataBody(server string, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationFormdataRequestBody) (*http.Request, error)
NewPostDeviceAuthorizationRequestWithFormdataBody calls the generic PostDeviceAuthorization builder with application/x-www-form-urlencoded body
func NewPostPairingConfirmRequest ¶
func NewPostPairingConfirmRequest(server string, params *PostPairingConfirmParams, body PostPairingConfirmJSONRequestBody) (*http.Request, error)
NewPostPairingConfirmRequest calls the generic PostPairingConfirm builder with application/json body
func NewPostPairingConfirmRequestWithBody ¶
func NewPostPairingConfirmRequestWithBody(server string, params *PostPairingConfirmParams, contentType string, body io.Reader) (*http.Request, error)
NewPostPairingConfirmRequestWithBody generates requests for PostPairingConfirm with any type of body
func NewPostPairingPubkeyRequest ¶
func NewPostPairingPubkeyRequest(server string, params *PostPairingPubkeyParams, body PostPairingPubkeyJSONRequestBody) (*http.Request, error)
NewPostPairingPubkeyRequest calls the generic PostPairingPubkey builder with application/json body
func NewPostPairingPubkeyRequestWithBody ¶
func NewPostPairingPubkeyRequestWithBody(server string, params *PostPairingPubkeyParams, contentType string, body io.Reader) (*http.Request, error)
NewPostPairingPubkeyRequestWithBody generates requests for PostPairingPubkey with any type of body
func NewPostRegisterRequest ¶
func NewPostRegisterRequest(server string, body PostRegisterJSONRequestBody) (*http.Request, error)
NewPostRegisterRequest calls the generic PostRegister builder with application/json body
func NewPostRegisterRequestWithBody ¶
func NewPostRegisterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostRegisterRequestWithBody generates requests for PostRegister with any type of body
func NewPostReloginRequest ¶
func NewPostReloginRequest(server string, body PostReloginJSONRequestBody) (*http.Request, error)
NewPostReloginRequest calls the generic PostRelogin builder with application/json body
func NewPostReloginRequestWithBody ¶
func NewPostReloginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostReloginRequestWithBody generates requests for PostRelogin with any type of body
func NewPostTokenRequestWithBody ¶
func NewPostTokenRequestWithBody(server string, params *PostTokenParams, contentType string, body io.Reader) (*http.Request, error)
NewPostTokenRequestWithBody generates requests for PostToken with any type of body
func NewPostTokenRequestWithFormdataBody ¶
func NewPostTokenRequestWithFormdataBody(server string, params *PostTokenParams, body PostTokenFormdataRequestBody) (*http.Request, error)
NewPostTokenRequestWithFormdataBody calls the generic PostToken builder with application/x-www-form-urlencoded body
func NewRefreshAttestedKeyRequest ¶
func NewRefreshAttestedKeyRequest(server string, params *RefreshAttestedKeyParams) (*http.Request, error)
NewRefreshAttestedKeyRequest generates requests for RefreshAttestedKey
func NewRevokePairingRequest ¶
func NewRevokePairingRequest(server string, id string, params *RevokePairingParams) (*http.Request, error)
NewRevokePairingRequest generates requests for RevokePairing
Types ¶
type AttestedKeyCertificate ¶
type AttestedKeyCertificate struct {
// AttestationBytes Base64url-encoded 136-byte AttestationV1 blob.
AttestationBytes string `json:"attestation_bytes"`
// AttestationSignature Base64url-encoded 64-byte raw r||s ECDSA P-256 signature over SHA-256(attestation_bytes).
AttestationSignature string `json:"attestation_signature"`
CertificateId openapi_types.UUID `json:"certificate_id"`
// DeviceKeyId ID of the device signing key the certificate was issued for.
DeviceKeyId openapi_types.UUID `json:"device_key_id"`
ExpiresAt time.Time `json:"expires_at"`
IssuedAt time.Time `json:"issued_at"`
// IssuerKeyId kid of the issuer key that signed this attestation.
IssuerKeyId string `json:"issuer_key_id"`
PolicyVersion int32 `json:"policy_version"`
}
AttestedKeyCertificate defines model for AttestedKeyCertificate.
type AttestedKeyConfig ¶
type AttestedKeyConfig struct {
// ActiveKid kid of the issuer key currently used for new attestations.
ActiveKid string `json:"active_kid"`
// AppIdHash Base64url SHA-256 of the configured AKZK app identifier.
AppIdHash string `json:"app_id_hash"`
// CircuitIdHex Lowercase hex circuit ID computed by attestedkeyzk.CircuitID at server startup.
CircuitIdHex string `json:"circuit_id_hex"`
IssuerKeys []AttestedKeyIssuerKey `json:"issuer_keys"`
PolicyVersion int32 `json:"policy_version"`
}
AttestedKeyConfig defines model for AttestedKeyConfig.
type AttestedKeyIssuerKey ¶
type AttestedKeyIssuerKey struct {
Kid string `json:"kid"`
// PubX Base64url 32-byte big-endian P-256 x coordinate.
PubX string `json:"pub_x"`
// PubY Base64url 32-byte big-endian P-256 y coordinate.
PubY string `json:"pub_y"`
}
AttestedKeyIssuerKey defines model for AttestedKeyIssuerKey.
type ChallengeResponse ¶
type ChallengeResponse struct {
ChallengeId string `json:"challenge_id"`
ExpiresAt time.Time `json:"expires_at"`
// Nonce Base64url random nonce.
Nonce string `json:"nonce"`
}
ChallengeResponse defines model for ChallengeResponse.
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) DeleteDevice ¶
func (c *Client) DeleteDevice(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAttestedKeyConfig ¶
func (*Client) GetAuthorize ¶
func (c *Client) GetAuthorize(ctx context.Context, params *GetAuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetChallenge ¶
func (*Client) GetDevice ¶
func (c *Client) GetDevice(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetMe ¶
func (c *Client) GetMe(ctx context.Context, params *GetMeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetOpenidConfiguration ¶
func (*Client) GetPairingStatus ¶
func (c *Client) GetPairingStatus(ctx context.Context, params *GetPairingStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListDevices ¶
func (c *Client) ListDevices(ctx context.Context, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListPairings ¶
func (c *Client) ListPairings(ctx context.Context, params *ListPairingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostDeviceAuthorization ¶
func (c *Client) PostDeviceAuthorization(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostDeviceAuthorizationWithBody ¶
func (*Client) PostDeviceAuthorizationWithFormdataBody ¶
func (c *Client) PostDeviceAuthorizationWithFormdataBody(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostPairingConfirm ¶
func (c *Client) PostPairingConfirm(ctx context.Context, params *PostPairingConfirmParams, body PostPairingConfirmJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostPairingConfirmWithBody ¶
func (*Client) PostPairingPubkey ¶
func (c *Client) PostPairingPubkey(ctx context.Context, params *PostPairingPubkeyParams, body PostPairingPubkeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostPairingPubkeyWithBody ¶
func (*Client) PostRegister ¶
func (c *Client) PostRegister(ctx context.Context, body PostRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostRegisterWithBody ¶
func (*Client) PostRelogin ¶
func (c *Client) PostRelogin(ctx context.Context, body PostReloginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostReloginWithBody ¶
func (*Client) PostTokenWithBody ¶
func (*Client) PostTokenWithFormdataBody ¶
func (c *Client) PostTokenWithFormdataBody(ctx context.Context, params *PostTokenParams, body PostTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RefreshAttestedKey ¶
func (c *Client) RefreshAttestedKey(ctx context.Context, params *RefreshAttestedKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RevokePairing ¶
func (c *Client) RevokePairing(ctx context.Context, id string, params *RevokePairingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetOpenidConfiguration request
GetOpenidConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAttestedKeyConfig request
GetAttestedKeyConfig(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// RefreshAttestedKey request
RefreshAttestedKey(ctx context.Context, params *RefreshAttestedKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAuthorize request
GetAuthorize(ctx context.Context, params *GetAuthorizeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetChallenge request
GetChallenge(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostDeviceAuthorizationWithBody request with any body
PostDeviceAuthorizationWithBody(ctx context.Context, params *PostDeviceAuthorizationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostDeviceAuthorization(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostDeviceAuthorizationWithFormdataBody(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListDevices request
ListDevices(ctx context.Context, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteDevice request
DeleteDevice(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDevice request
GetDevice(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJWKS request
GetJWKS(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMe request
GetMe(ctx context.Context, params *GetMeParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPairingStatus request
GetPairingStatus(ctx context.Context, params *GetPairingStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostPairingConfirmWithBody request with any body
PostPairingConfirmWithBody(ctx context.Context, params *PostPairingConfirmParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostPairingConfirm(ctx context.Context, params *PostPairingConfirmParams, body PostPairingConfirmJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostPairingPubkeyWithBody request with any body
PostPairingPubkeyWithBody(ctx context.Context, params *PostPairingPubkeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostPairingPubkey(ctx context.Context, params *PostPairingPubkeyParams, body PostPairingPubkeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListPairings request
ListPairings(ctx context.Context, params *ListPairingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokePairing request
RevokePairing(ctx context.Context, id string, params *RevokePairingParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostRegisterWithBody request with any body
PostRegisterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostRegister(ctx context.Context, body PostRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostReloginWithBody request with any body
PostReloginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostRelogin(ctx context.Context, body PostReloginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostTokenWithBody request with any body
PostTokenWithBody(ctx context.Context, params *PostTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostTokenWithFormdataBody(ctx context.Context, params *PostTokenParams, body PostTokenFormdataRequestBody, 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) DeleteDeviceWithResponse ¶
func (c *ClientWithResponses) DeleteDeviceWithResponse(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*DeleteDeviceResp, error)
DeleteDeviceWithResponse request returning *DeleteDeviceResp
func (*ClientWithResponses) GetAttestedKeyConfigWithResponse ¶
func (c *ClientWithResponses) GetAttestedKeyConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAttestedKeyConfigResp, error)
GetAttestedKeyConfigWithResponse request returning *GetAttestedKeyConfigResp
func (*ClientWithResponses) GetAuthorizeWithResponse ¶
func (c *ClientWithResponses) GetAuthorizeWithResponse(ctx context.Context, params *GetAuthorizeParams, reqEditors ...RequestEditorFn) (*GetAuthorizeResp, error)
GetAuthorizeWithResponse request returning *GetAuthorizeResp
func (*ClientWithResponses) GetChallengeWithResponse ¶
func (c *ClientWithResponses) GetChallengeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetChallengeResp, error)
GetChallengeWithResponse request returning *GetChallengeResp
func (*ClientWithResponses) GetDeviceWithResponse ¶
func (c *ClientWithResponses) GetDeviceWithResponse(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*GetDeviceResp, error)
GetDeviceWithResponse request returning *GetDeviceResp
func (*ClientWithResponses) GetJWKSWithResponse ¶
func (c *ClientWithResponses) GetJWKSWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJWKSResp, error)
GetJWKSWithResponse request returning *GetJWKSResp
func (*ClientWithResponses) GetMeWithResponse ¶
func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, params *GetMeParams, reqEditors ...RequestEditorFn) (*GetMeResp, error)
GetMeWithResponse request returning *GetMeResp
func (*ClientWithResponses) GetOpenidConfigurationWithResponse ¶
func (c *ClientWithResponses) GetOpenidConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenidConfigurationResp, error)
GetOpenidConfigurationWithResponse request returning *GetOpenidConfigurationResp
func (*ClientWithResponses) GetPairingStatusWithResponse ¶
func (c *ClientWithResponses) GetPairingStatusWithResponse(ctx context.Context, params *GetPairingStatusParams, reqEditors ...RequestEditorFn) (*GetPairingStatusResp, error)
GetPairingStatusWithResponse request returning *GetPairingStatusResp
func (*ClientWithResponses) ListDevicesWithResponse ¶
func (c *ClientWithResponses) ListDevicesWithResponse(ctx context.Context, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*ListDevicesResp, error)
ListDevicesWithResponse request returning *ListDevicesResp
func (*ClientWithResponses) ListPairingsWithResponse ¶
func (c *ClientWithResponses) ListPairingsWithResponse(ctx context.Context, params *ListPairingsParams, reqEditors ...RequestEditorFn) (*ListPairingsResp, error)
ListPairingsWithResponse request returning *ListPairingsResp
func (*ClientWithResponses) PostDeviceAuthorizationWithBodyWithResponse ¶
func (c *ClientWithResponses) PostDeviceAuthorizationWithBodyWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDeviceAuthorizationResp, error)
PostDeviceAuthorizationWithBodyWithResponse request with arbitrary body returning *PostDeviceAuthorizationResp
func (*ClientWithResponses) PostDeviceAuthorizationWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) PostDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostDeviceAuthorizationResp, error)
func (*ClientWithResponses) PostDeviceAuthorizationWithResponse ¶
func (c *ClientWithResponses) PostDeviceAuthorizationWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDeviceAuthorizationResp, error)
func (*ClientWithResponses) PostPairingConfirmWithBodyWithResponse ¶
func (c *ClientWithResponses) PostPairingConfirmWithBodyWithResponse(ctx context.Context, params *PostPairingConfirmParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPairingConfirmResp, error)
PostPairingConfirmWithBodyWithResponse request with arbitrary body returning *PostPairingConfirmResp
func (*ClientWithResponses) PostPairingConfirmWithResponse ¶
func (c *ClientWithResponses) PostPairingConfirmWithResponse(ctx context.Context, params *PostPairingConfirmParams, body PostPairingConfirmJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPairingConfirmResp, error)
func (*ClientWithResponses) PostPairingPubkeyWithBodyWithResponse ¶
func (c *ClientWithResponses) PostPairingPubkeyWithBodyWithResponse(ctx context.Context, params *PostPairingPubkeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPairingPubkeyResp, error)
PostPairingPubkeyWithBodyWithResponse request with arbitrary body returning *PostPairingPubkeyResp
func (*ClientWithResponses) PostPairingPubkeyWithResponse ¶
func (c *ClientWithResponses) PostPairingPubkeyWithResponse(ctx context.Context, params *PostPairingPubkeyParams, body PostPairingPubkeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPairingPubkeyResp, error)
func (*ClientWithResponses) PostRegisterWithBodyWithResponse ¶
func (c *ClientWithResponses) PostRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRegisterResp, error)
PostRegisterWithBodyWithResponse request with arbitrary body returning *PostRegisterResp
func (*ClientWithResponses) PostRegisterWithResponse ¶
func (c *ClientWithResponses) PostRegisterWithResponse(ctx context.Context, body PostRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRegisterResp, error)
func (*ClientWithResponses) PostReloginWithBodyWithResponse ¶
func (c *ClientWithResponses) PostReloginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostReloginResp, error)
PostReloginWithBodyWithResponse request with arbitrary body returning *PostReloginResp
func (*ClientWithResponses) PostReloginWithResponse ¶
func (c *ClientWithResponses) PostReloginWithResponse(ctx context.Context, body PostReloginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostReloginResp, error)
func (*ClientWithResponses) PostTokenWithBodyWithResponse ¶
func (c *ClientWithResponses) PostTokenWithBodyWithResponse(ctx context.Context, params *PostTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTokenResp, error)
PostTokenWithBodyWithResponse request with arbitrary body returning *PostTokenResp
func (*ClientWithResponses) PostTokenWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) PostTokenWithFormdataBodyWithResponse(ctx context.Context, params *PostTokenParams, body PostTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostTokenResp, error)
func (*ClientWithResponses) RefreshAttestedKeyWithResponse ¶
func (c *ClientWithResponses) RefreshAttestedKeyWithResponse(ctx context.Context, params *RefreshAttestedKeyParams, reqEditors ...RequestEditorFn) (*RefreshAttestedKeyResp, error)
RefreshAttestedKeyWithResponse request returning *RefreshAttestedKeyResp
func (*ClientWithResponses) RevokePairingWithResponse ¶
func (c *ClientWithResponses) RevokePairingWithResponse(ctx context.Context, id string, params *RevokePairingParams, reqEditors ...RequestEditorFn) (*RevokePairingResp, error)
RevokePairingWithResponse request returning *RevokePairingResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetOpenidConfigurationWithResponse request
GetOpenidConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenidConfigurationResp, error)
// GetAttestedKeyConfigWithResponse request
GetAttestedKeyConfigWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAttestedKeyConfigResp, error)
// RefreshAttestedKeyWithResponse request
RefreshAttestedKeyWithResponse(ctx context.Context, params *RefreshAttestedKeyParams, reqEditors ...RequestEditorFn) (*RefreshAttestedKeyResp, error)
// GetAuthorizeWithResponse request
GetAuthorizeWithResponse(ctx context.Context, params *GetAuthorizeParams, reqEditors ...RequestEditorFn) (*GetAuthorizeResp, error)
// GetChallengeWithResponse request
GetChallengeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetChallengeResp, error)
// PostDeviceAuthorizationWithBodyWithResponse request with any body
PostDeviceAuthorizationWithBodyWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDeviceAuthorizationResp, error)
PostDeviceAuthorizationWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDeviceAuthorizationResp, error)
PostDeviceAuthorizationWithFormdataBodyWithResponse(ctx context.Context, params *PostDeviceAuthorizationParams, body PostDeviceAuthorizationFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostDeviceAuthorizationResp, error)
// ListDevicesWithResponse request
ListDevicesWithResponse(ctx context.Context, params *ListDevicesParams, reqEditors ...RequestEditorFn) (*ListDevicesResp, error)
// DeleteDeviceWithResponse request
DeleteDeviceWithResponse(ctx context.Context, id string, params *DeleteDeviceParams, reqEditors ...RequestEditorFn) (*DeleteDeviceResp, error)
// GetDeviceWithResponse request
GetDeviceWithResponse(ctx context.Context, id string, params *GetDeviceParams, reqEditors ...RequestEditorFn) (*GetDeviceResp, error)
// GetJWKSWithResponse request
GetJWKSWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJWKSResp, error)
// GetMeWithResponse request
GetMeWithResponse(ctx context.Context, params *GetMeParams, reqEditors ...RequestEditorFn) (*GetMeResp, error)
// GetPairingStatusWithResponse request
GetPairingStatusWithResponse(ctx context.Context, params *GetPairingStatusParams, reqEditors ...RequestEditorFn) (*GetPairingStatusResp, error)
// PostPairingConfirmWithBodyWithResponse request with any body
PostPairingConfirmWithBodyWithResponse(ctx context.Context, params *PostPairingConfirmParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPairingConfirmResp, error)
PostPairingConfirmWithResponse(ctx context.Context, params *PostPairingConfirmParams, body PostPairingConfirmJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPairingConfirmResp, error)
// PostPairingPubkeyWithBodyWithResponse request with any body
PostPairingPubkeyWithBodyWithResponse(ctx context.Context, params *PostPairingPubkeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPairingPubkeyResp, error)
PostPairingPubkeyWithResponse(ctx context.Context, params *PostPairingPubkeyParams, body PostPairingPubkeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPairingPubkeyResp, error)
// ListPairingsWithResponse request
ListPairingsWithResponse(ctx context.Context, params *ListPairingsParams, reqEditors ...RequestEditorFn) (*ListPairingsResp, error)
// RevokePairingWithResponse request
RevokePairingWithResponse(ctx context.Context, id string, params *RevokePairingParams, reqEditors ...RequestEditorFn) (*RevokePairingResp, error)
// PostRegisterWithBodyWithResponse request with any body
PostRegisterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRegisterResp, error)
PostRegisterWithResponse(ctx context.Context, body PostRegisterJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRegisterResp, error)
// PostReloginWithBodyWithResponse request with any body
PostReloginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostReloginResp, error)
PostReloginWithResponse(ctx context.Context, body PostReloginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostReloginResp, error)
// PostTokenWithBodyWithResponse request with any body
PostTokenWithBodyWithResponse(ctx context.Context, params *PostTokenParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTokenResp, error)
PostTokenWithFormdataBodyWithResponse(ctx context.Context, params *PostTokenParams, body PostTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*PostTokenResp, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DeleteDeviceParams ¶
type DeleteDeviceParams struct {
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
DeleteDeviceParams defines parameters for DeleteDevice.
type DeleteDeviceResp ¶
type DeleteDeviceResp struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON409 *Conflict
}
func ParseDeleteDeviceResp ¶
func ParseDeleteDeviceResp(rsp *http.Response) (*DeleteDeviceResp, error)
ParseDeleteDeviceResp parses an HTTP response from a DeleteDeviceWithResponse call
func (DeleteDeviceResp) Status ¶
func (r DeleteDeviceResp) Status() string
Status returns HTTPResponse.Status
func (DeleteDeviceResp) StatusCode ¶
func (r DeleteDeviceResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Device ¶
type Device struct {
ApnsEnvironment *DeviceApnsEnvironment `json:"apns_environment,omitempty"`
AppId string `json:"app_id"`
AttestationType DeviceAttestationType `json:"attestation_type"`
AttestationVerifiedAt *time.Time `json:"attestation_verified_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
DeviceName *string `json:"device_name,omitempty"`
DeviceType DeviceDeviceType `json:"device_type"`
Id openapi_types.UUID `json:"id"`
LastUsedAt *time.Time `json:"last_used_at,omitempty"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
}
Device defines model for Device.
type DeviceApnsEnvironment ¶
type DeviceApnsEnvironment string
DeviceApnsEnvironment defines model for Device.ApnsEnvironment.
const ( Development DeviceApnsEnvironment = "development" Production DeviceApnsEnvironment = "production" )
Defines values for DeviceApnsEnvironment.
func (DeviceApnsEnvironment) Valid ¶
func (e DeviceApnsEnvironment) Valid() bool
Valid indicates whether the value is a known member of the DeviceApnsEnvironment enum.
type DeviceAttestationType ¶
type DeviceAttestationType string
DeviceAttestationType defines model for Device.AttestationType.
const ( DeviceAttestationTypeAndroidStrongbox DeviceAttestationType = "android_strongbox" DeviceAttestationTypeAndroidTee DeviceAttestationType = "android_tee" DeviceAttestationTypeIosSecureEnclave DeviceAttestationType = "ios_secure_enclave" DeviceAttestationTypeSoftware DeviceAttestationType = "software" )
Defines values for DeviceAttestationType.
func (DeviceAttestationType) Valid ¶
func (e DeviceAttestationType) Valid() bool
Valid indicates whether the value is a known member of the DeviceAttestationType enum.
type DeviceAuthorizationRequest ¶
type DeviceAuthorizationRequest struct {
ClientId string `json:"client_id"`
// DeviceKemPubkey Public JWK of the freshly generated per-pairing device KEM key
// D_kem (used for ECDH/HPKE). The pairing transcript hashes this
// KEM key, not the signing key.
DeviceKemPubkey JWK `json:"device_kem_pubkey"`
// DeviceSigningPubkey Public JWK of the freshly generated per-pairing device signing
// key D_sig (used for DPoP). The access token issued by the eventual
// /token call will be DPoP-bound to this key's JWK thumbprint in
// auth's server-side token metadata.
DeviceSigningPubkey JWK `json:"device_signing_pubkey"`
// Origin Captcha (relying-party) clients send their parent origin so the
// user-facing confirmation can name the site. CLI clients omit
// this field.
Origin *string `json:"origin,omitempty"`
Scope *string `json:"scope,omitempty"`
}
DeviceAuthorizationRequest defines model for DeviceAuthorizationRequest.
type DeviceAuthorizationResponse ¶
type DeviceAuthorizationResponse struct {
DeviceCode string `json:"device_code"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
UserCode string `json:"user_code"`
VerificationUri string `json:"verification_uri"`
VerificationUriComplete *string `json:"verification_uri_complete,omitempty"`
}
DeviceAuthorizationResponse defines model for DeviceAuthorizationResponse.
type DeviceDeviceType ¶
type DeviceDeviceType string
DeviceDeviceType defines model for Device.DeviceType.
const ( Android DeviceDeviceType = "android" Ios DeviceDeviceType = "ios" )
Defines values for DeviceDeviceType.
func (DeviceDeviceType) Valid ¶
func (e DeviceDeviceType) Valid() bool
Valid indicates whether the value is a known member of the DeviceDeviceType enum.
type DeviceList ¶
type DeviceList struct {
Devices []Device `json:"devices"`
}
DeviceList defines model for DeviceList.
type GetAttestedKeyConfigResp ¶
type GetAttestedKeyConfigResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AttestedKeyConfig
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetAttestedKeyConfigResp ¶
func ParseGetAttestedKeyConfigResp(rsp *http.Response) (*GetAttestedKeyConfigResp, error)
ParseGetAttestedKeyConfigResp parses an HTTP response from a GetAttestedKeyConfigWithResponse call
func (GetAttestedKeyConfigResp) Status ¶
func (r GetAttestedKeyConfigResp) Status() string
Status returns HTTPResponse.Status
func (GetAttestedKeyConfigResp) StatusCode ¶
func (r GetAttestedKeyConfigResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAuthorizeParams ¶
type GetAuthorizeParams struct {
ClientId string `form:"client_id" json:"client_id"`
RedirectUri string `form:"redirect_uri" json:"redirect_uri"`
ResponseType GetAuthorizeParamsResponseType `form:"response_type" json:"response_type"`
// Scope Space-separated scope list. Requester clients should use `offline_access mailbox:request`.
Scope string `form:"scope" json:"scope"`
State *string `form:"state,omitempty" json:"state,omitempty"`
Nonce *string `form:"nonce,omitempty" json:"nonce,omitempty"`
CodeChallenge string `form:"code_challenge" json:"code_challenge"`
CodeChallengeMethod GetAuthorizeParamsCodeChallengeMethod `form:"code_challenge_method" json:"code_challenge_method"`
Prompt *string `form:"prompt,omitempty" json:"prompt,omitempty"`
}
GetAuthorizeParams defines parameters for GetAuthorize.
type GetAuthorizeParamsCodeChallengeMethod ¶
type GetAuthorizeParamsCodeChallengeMethod string
GetAuthorizeParamsCodeChallengeMethod defines parameters for GetAuthorize.
const (
S256 GetAuthorizeParamsCodeChallengeMethod = "S256"
)
Defines values for GetAuthorizeParamsCodeChallengeMethod.
func (GetAuthorizeParamsCodeChallengeMethod) Valid ¶
func (e GetAuthorizeParamsCodeChallengeMethod) Valid() bool
Valid indicates whether the value is a known member of the GetAuthorizeParamsCodeChallengeMethod enum.
type GetAuthorizeParamsResponseType ¶
type GetAuthorizeParamsResponseType string
GetAuthorizeParamsResponseType defines parameters for GetAuthorize.
const (
Code GetAuthorizeParamsResponseType = "code"
)
Defines values for GetAuthorizeParamsResponseType.
func (GetAuthorizeParamsResponseType) Valid ¶
func (e GetAuthorizeParamsResponseType) Valid() bool
Valid indicates whether the value is a known member of the GetAuthorizeParamsResponseType enum.
type GetAuthorizeResp ¶
type GetAuthorizeResp struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON400 *BadRequest
}
func ParseGetAuthorizeResp ¶
func ParseGetAuthorizeResp(rsp *http.Response) (*GetAuthorizeResp, error)
ParseGetAuthorizeResp parses an HTTP response from a GetAuthorizeWithResponse call
func (GetAuthorizeResp) Status ¶
func (r GetAuthorizeResp) Status() string
Status returns HTTPResponse.Status
func (GetAuthorizeResp) StatusCode ¶
func (r GetAuthorizeResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetChallengeResp ¶
type GetChallengeResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ChallengeResponse
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetChallengeResp ¶
func ParseGetChallengeResp(rsp *http.Response) (*GetChallengeResp, error)
ParseGetChallengeResp parses an HTTP response from a GetChallengeWithResponse call
func (GetChallengeResp) Status ¶
func (r GetChallengeResp) Status() string
Status returns HTTPResponse.Status
func (GetChallengeResp) StatusCode ¶
func (r GetChallengeResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDeviceParams ¶
type GetDeviceParams struct {
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
GetDeviceParams defines parameters for GetDevice.
type GetDeviceResp ¶
type GetDeviceResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Device
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
}
func ParseGetDeviceResp ¶
func ParseGetDeviceResp(rsp *http.Response) (*GetDeviceResp, error)
ParseGetDeviceResp parses an HTTP response from a GetDeviceWithResponse call
func (GetDeviceResp) Status ¶
func (r GetDeviceResp) Status() string
Status returns HTTPResponse.Status
func (GetDeviceResp) StatusCode ¶
func (r GetDeviceResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetJWKSResp ¶
type GetJWKSResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *JWKS
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetJWKSResp ¶
func ParseGetJWKSResp(rsp *http.Response) (*GetJWKSResp, error)
ParseGetJWKSResp parses an HTTP response from a GetJWKSWithResponse call
func (GetJWKSResp) StatusCode ¶
func (r GetJWKSResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetMeParams ¶
type GetMeParams struct {
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
GetMeParams defines parameters for GetMe.
type GetMeResp ¶
type GetMeResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *MeResponse
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
}
func ParseGetMeResp ¶
ParseGetMeResp parses an HTTP response from a GetMeWithResponse call
func (GetMeResp) StatusCode ¶
StatusCode returns HTTPResponse.StatusCode
type GetOpenidConfigurationResp ¶
type GetOpenidConfigurationResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *OpenIDConfiguration
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetOpenidConfigurationResp ¶
func ParseGetOpenidConfigurationResp(rsp *http.Response) (*GetOpenidConfigurationResp, error)
ParseGetOpenidConfigurationResp parses an HTTP response from a GetOpenidConfigurationWithResponse call
func (GetOpenidConfigurationResp) Status ¶
func (r GetOpenidConfigurationResp) Status() string
Status returns HTTPResponse.Status
func (GetOpenidConfigurationResp) StatusCode ¶
func (r GetOpenidConfigurationResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPairingStatusParams ¶
type GetPairingStatusParams struct {
DeviceCode string `form:"device_code" json:"device_code"`
}
GetPairingStatusParams defines parameters for GetPairingStatus.
type GetPairingStatusResp ¶
type GetPairingStatusResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PairingStatusResponse
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON429 *TooManyRequests
}
func ParseGetPairingStatusResp ¶
func ParseGetPairingStatusResp(rsp *http.Response) (*GetPairingStatusResp, error)
ParseGetPairingStatusResp parses an HTTP response from a GetPairingStatusWithResponse call
func (GetPairingStatusResp) Status ¶
func (r GetPairingStatusResp) Status() string
Status returns HTTPResponse.Status
func (GetPairingStatusResp) StatusCode ¶
func (r GetPairingStatusResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type JWK ¶
type JWK struct {
Alg *string `json:"alg,omitempty"`
// Crv Curve identifier (e.g. P-256, Ed25519).
Crv *string `json:"crv,omitempty"`
// E Base64url RSA exponent.
E *string `json:"e,omitempty"`
Kid *string `json:"kid,omitempty"`
Kty JWKKty `json:"kty"`
// N Base64url RSA modulus.
N *string `json:"n,omitempty"`
Use *string `json:"use,omitempty"`
// X Base64url(big-endian X coordinate) for EC; base64url public key for OKP.
X *string `json:"x,omitempty"`
// Y Base64url(big-endian Y coordinate) for EC.
Y *string `json:"y,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
JWK A JSON Web Key (RFC 7517). NaughtBot only mints EC P-256 keys for DPoP-bound auth flows, but the schema supports the full RFC 7517 shape so requesters can submit or display RSA/OKP keys where a route accepts a generic JWK.
func (JWK) Get ¶
Getter for additional properties for JWK. Returns the specified element and whether it was found
func (JWK) MarshalJSON ¶
Override default JSON handling for JWK to handle AdditionalProperties
func (*JWK) UnmarshalJSON ¶
Override default JSON handling for JWK to handle AdditionalProperties
type ListDevicesParams ¶
type ListDevicesParams struct {
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
ListDevicesParams defines parameters for ListDevices.
type ListDevicesResp ¶
type ListDevicesResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DeviceList
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
}
func ParseListDevicesResp ¶
func ParseListDevicesResp(rsp *http.Response) (*ListDevicesResp, error)
ParseListDevicesResp parses an HTTP response from a ListDevicesWithResponse call
func (ListDevicesResp) Status ¶
func (r ListDevicesResp) Status() string
Status returns HTTPResponse.Status
func (ListDevicesResp) StatusCode ¶
func (r ListDevicesResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListPairingsParams ¶
type ListPairingsParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
ListPairingsParams defines parameters for ListPairings.
type ListPairingsResp ¶
type ListPairingsResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PairingList
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
}
func ParseListPairingsResp ¶
func ParseListPairingsResp(rsp *http.Response) (*ListPairingsResp, error)
ParseListPairingsResp parses an HTTP response from a ListPairingsWithResponse call
func (ListPairingsResp) Status ¶
func (r ListPairingsResp) Status() string
Status returns HTTPResponse.Status
func (ListPairingsResp) StatusCode ¶
func (r ListPairingsResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MeResponse ¶
MeResponse defines model for MeResponse.
type OAuthError ¶
type OAuthError struct {
// Error OAuth error code. `use_dpop_nonce` means retry with the returned `DPoP-Nonce` in a fresh proof.
Error string `json:"error"`
ErrorDescription *string `json:"error_description,omitempty"`
}
OAuthError defines model for OAuthError.
type OpenIDConfiguration ¶
type OpenIDConfiguration struct {
AuthorizationEndpoint string `json:"authorization_endpoint"`
CodeChallengeMethodsSupported *[]string `json:"code_challenge_methods_supported,omitempty"`
DeviceAuthorizationEndpoint *string `json:"device_authorization_endpoint,omitempty"`
// DpopSigningAlgValuesSupported RFC 9449 §5.1 — algorithms accepted in DPoP proof JWTs. NaughtBot always returns ["ES256"].
DpopSigningAlgValuesSupported []string `json:"dpop_signing_alg_values_supported"`
GrantTypesSupported *[]string `json:"grant_types_supported,omitempty"`
IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"`
Issuer string `json:"issuer"`
JwksUri string `json:"jwks_uri"`
ResponseTypesSupported []string `json:"response_types_supported"`
ScopesSupported *[]string `json:"scopes_supported,omitempty"`
SubjectTypesSupported []string `json:"subject_types_supported"`
TokenEndpoint string `json:"token_endpoint"`
TokenEndpointAuthMethodsSupported *[]string `json:"token_endpoint_auth_methods_supported,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
OpenIDConfiguration defines model for OpenIDConfiguration.
func (OpenIDConfiguration) Get ¶
func (a OpenIDConfiguration) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for OpenIDConfiguration. Returns the specified element and whether it was found
func (OpenIDConfiguration) MarshalJSON ¶
func (a OpenIDConfiguration) MarshalJSON() ([]byte, error)
Override default JSON handling for OpenIDConfiguration to handle AdditionalProperties
func (*OpenIDConfiguration) Set ¶
func (a *OpenIDConfiguration) Set(fieldName string, value interface{})
Setter for additional properties for OpenIDConfiguration
func (*OpenIDConfiguration) UnmarshalJSON ¶
func (a *OpenIDConfiguration) UnmarshalJSON(b []byte) error
Override default JSON handling for OpenIDConfiguration to handle AdditionalProperties
type Pairing ¶
type Pairing struct {
ClientId string `json:"client_id"`
CreatedAt time.Time `json:"created_at"`
DeviceId *openapi_types.UUID `json:"device_id,omitempty"`
Id openapi_types.UUID `json:"id"`
// Jkt Base64url SHA-256 thumbprint of D_sig (the device signing key).
Jkt string `json:"jkt"`
LastUsedAt *time.Time `json:"last_used_at,omitempty"`
// Origin Pairing origin (captcha clients only).
Origin *string `json:"origin,omitempty"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
Scopes *[]string `json:"scopes,omitempty"`
Status PairingStatus `json:"status"`
}
Pairing defines model for Pairing.
type PairingConfirmRequest ¶
type PairingConfirmRequest struct {
DeviceCode string `json:"device_code"`
// Origin Echoes the pairing's origin so the approver UI can show the
// relying-party site for explicit user confirmation. Captcha
// clients populate this; CLI clients omit it.
Origin *string `json:"origin,omitempty"`
// Sas SAS digits or words verified by the user.
Sas string `json:"sas"`
}
PairingConfirmRequest defines model for PairingConfirmRequest.
type PairingList ¶
type PairingList struct {
Pairings []Pairing `json:"pairings"`
}
PairingList defines model for PairingList.
type PairingPubkeyRequest ¶
type PairingPubkeyRequest struct {
DeviceCode string `json:"device_code"`
// TranscriptHash Base64url SHA-256 of the pairing transcript
// ("v1\x00" || D_kem || U_kem || uvarint(len(device_code)) || device_code).
TranscriptHash string `json:"transcript_hash"`
// UserKemPubkey Approver's user KEM public key (U_kem); the pairing transcript uses this.
UserKemPubkey JWK `json:"user_kem_pubkey"`
// UserSigningPubkey Approver's user signing public key (U_sig).
UserSigningPubkey JWK `json:"user_signing_pubkey"`
}
PairingPubkeyRequest defines model for PairingPubkeyRequest.
type PairingPubkeyResponse ¶
type PairingPubkeyResponse struct {
// DKemPubkey Server's view of the requester device KEM public key (D_kem). The
// signing key (D_sig) is server-side state for DPoP binding and is
// not returned here.
DKemPubkey JWK `json:"d_kem_pubkey"`
TranscriptHash string `json:"transcript_hash"`
}
PairingPubkeyResponse defines model for PairingPubkeyResponse.
type PairingStatus ¶
type PairingStatus string
PairingStatus defines model for Pairing.Status.
const ( PairingStatusActive PairingStatus = "active" PairingStatusExpired PairingStatus = "expired" PairingStatusRevoked PairingStatus = "revoked" )
Defines values for PairingStatus.
func (PairingStatus) Valid ¶
func (e PairingStatus) Valid() bool
Valid indicates whether the value is a known member of the PairingStatus enum.
type PairingStatusResponse ¶
type PairingStatusResponse struct {
Status PairingStatusResponseStatus `json:"status"`
// UserKemPubkey Approver's user KEM public key (U_kem), present once status >=
// user_pubkey_received. Used by the requester to derive the
// ECDH/HPKE shared secret.
UserKemPubkey *JWK `json:"user_kem_pubkey,omitempty"`
}
PairingStatusResponse defines model for PairingStatusResponse.
type PairingStatusResponseStatus ¶
type PairingStatusResponseStatus string
PairingStatusResponseStatus defines model for PairingStatusResponse.Status.
const ( PairingStatusResponseStatusDenied PairingStatusResponseStatus = "denied" PairingStatusResponseStatusExpired PairingStatusResponseStatus = "expired" PairingStatusResponseStatusPending PairingStatusResponseStatus = "pending" PairingStatusResponseStatusSasConfirmed PairingStatusResponseStatus = "sas_confirmed" PairingStatusResponseStatusUserPubkeyReceived PairingStatusResponseStatus = "user_pubkey_received" )
Defines values for PairingStatusResponseStatus.
func (PairingStatusResponseStatus) Valid ¶
func (e PairingStatusResponseStatus) Valid() bool
Valid indicates whether the value is a known member of the PairingStatusResponseStatus enum.
type PostDeviceAuthorizationFormdataRequestBody ¶
type PostDeviceAuthorizationFormdataRequestBody = DeviceAuthorizationRequest
PostDeviceAuthorizationFormdataRequestBody defines body for PostDeviceAuthorization for application/x-www-form-urlencoded ContentType.
type PostDeviceAuthorizationJSONRequestBody ¶
type PostDeviceAuthorizationJSONRequestBody = DeviceAuthorizationRequest
PostDeviceAuthorizationJSONRequestBody defines body for PostDeviceAuthorization for application/json ContentType.
type PostDeviceAuthorizationParams ¶
type PostDeviceAuthorizationParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
}
PostDeviceAuthorizationParams defines parameters for PostDeviceAuthorization.
type PostDeviceAuthorizationResp ¶
type PostDeviceAuthorizationResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *DeviceAuthorizationResponse
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON429 *TooManyRequests
}
func ParsePostDeviceAuthorizationResp ¶
func ParsePostDeviceAuthorizationResp(rsp *http.Response) (*PostDeviceAuthorizationResp, error)
ParsePostDeviceAuthorizationResp parses an HTTP response from a PostDeviceAuthorizationWithResponse call
func (PostDeviceAuthorizationResp) Status ¶
func (r PostDeviceAuthorizationResp) Status() string
Status returns HTTPResponse.Status
func (PostDeviceAuthorizationResp) StatusCode ¶
func (r PostDeviceAuthorizationResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostPairingConfirmJSONRequestBody ¶
type PostPairingConfirmJSONRequestBody = PairingConfirmRequest
PostPairingConfirmJSONRequestBody defines body for PostPairingConfirm for application/json ContentType.
type PostPairingConfirmParams ¶
type PostPairingConfirmParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
PostPairingConfirmParams defines parameters for PostPairingConfirm.
type PostPairingConfirmResp ¶
type PostPairingConfirmResp struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON409 *Conflict
}
func ParsePostPairingConfirmResp ¶
func ParsePostPairingConfirmResp(rsp *http.Response) (*PostPairingConfirmResp, error)
ParsePostPairingConfirmResp parses an HTTP response from a PostPairingConfirmWithResponse call
func (PostPairingConfirmResp) Status ¶
func (r PostPairingConfirmResp) Status() string
Status returns HTTPResponse.Status
func (PostPairingConfirmResp) StatusCode ¶
func (r PostPairingConfirmResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostPairingPubkeyJSONRequestBody ¶
type PostPairingPubkeyJSONRequestBody = PairingPubkeyRequest
PostPairingPubkeyJSONRequestBody defines body for PostPairingPubkey for application/json ContentType.
type PostPairingPubkeyParams ¶
type PostPairingPubkeyParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
PostPairingPubkeyParams defines parameters for PostPairingPubkey.
type PostPairingPubkeyResp ¶
type PostPairingPubkeyResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PairingPubkeyResponse
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON409 *Conflict
}
func ParsePostPairingPubkeyResp ¶
func ParsePostPairingPubkeyResp(rsp *http.Response) (*PostPairingPubkeyResp, error)
ParsePostPairingPubkeyResp parses an HTTP response from a PostPairingPubkeyWithResponse call
func (PostPairingPubkeyResp) Status ¶
func (r PostPairingPubkeyResp) Status() string
Status returns HTTPResponse.Status
func (PostPairingPubkeyResp) StatusCode ¶
func (r PostPairingPubkeyResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostRegisterJSONRequestBody ¶
type PostRegisterJSONRequestBody = RegisterRequest
PostRegisterJSONRequestBody defines body for PostRegister for application/json ContentType.
type PostRegisterResp ¶
type PostRegisterResp struct {
Body []byte
HTTPResponse *http.Response
JSON201 *RegisterResponse
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON409 *Conflict
ApplicationproblemJSON422 *UnprocessableEntity
ApplicationproblemJSON429 *TooManyRequests
}
func ParsePostRegisterResp ¶
func ParsePostRegisterResp(rsp *http.Response) (*PostRegisterResp, error)
ParsePostRegisterResp parses an HTTP response from a PostRegisterWithResponse call
func (PostRegisterResp) Status ¶
func (r PostRegisterResp) Status() string
Status returns HTTPResponse.Status
func (PostRegisterResp) StatusCode ¶
func (r PostRegisterResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostReloginJSONRequestBody ¶
type PostReloginJSONRequestBody = ReloginRequest
PostReloginJSONRequestBody defines body for PostRelogin for application/json ContentType.
type PostReloginResp ¶
type PostReloginResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ReloginResponse
ApplicationproblemJSON400 *BadRequest
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON404 *NotFound
ApplicationproblemJSON429 *TooManyRequests
}
func ParsePostReloginResp ¶
func ParsePostReloginResp(rsp *http.Response) (*PostReloginResp, error)
ParsePostReloginResp parses an HTTP response from a PostReloginWithResponse call
func (PostReloginResp) Status ¶
func (r PostReloginResp) Status() string
Status returns HTTPResponse.Status
func (PostReloginResp) StatusCode ¶
func (r PostReloginResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostTokenFormdataRequestBody ¶
type PostTokenFormdataRequestBody = TokenRequest
PostTokenFormdataRequestBody defines body for PostToken for application/x-www-form-urlencoded ContentType.
type PostTokenParams ¶
type PostTokenParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
PostTokenParams defines parameters for PostToken.
type PostTokenResp ¶
type PostTokenResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *TokenResponse
JSON400 *OAuthError
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON429 *TooManyRequests
}
func ParsePostTokenResp ¶
func ParsePostTokenResp(rsp *http.Response) (*PostTokenResp, error)
ParsePostTokenResp parses an HTTP response from a PostTokenWithResponse call
func (PostTokenResp) Status ¶
func (r PostTokenResp) Status() string
Status returns HTTPResponse.Status
func (PostTokenResp) StatusCode ¶
func (r PostTokenResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ProblemDetails ¶
type ProblemDetails struct {
Detail *string `json:"detail,omitempty"`
Instance *string `json:"instance,omitempty"`
Status *int `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ProblemDetails RFC 9457 problem details object.
func (ProblemDetails) Get ¶
func (a ProblemDetails) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ProblemDetails. Returns the specified element and whether it was found
func (ProblemDetails) MarshalJSON ¶
func (a ProblemDetails) MarshalJSON() ([]byte, error)
Override default JSON handling for ProblemDetails to handle AdditionalProperties
func (*ProblemDetails) Set ¶
func (a *ProblemDetails) Set(fieldName string, value interface{})
Setter for additional properties for ProblemDetails
func (*ProblemDetails) UnmarshalJSON ¶
func (a *ProblemDetails) UnmarshalJSON(b []byte) error
Override default JSON handling for ProblemDetails to handle AdditionalProperties
type RefreshAttestedKeyParams ¶
type RefreshAttestedKeyParams struct {
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
RefreshAttestedKeyParams defines parameters for RefreshAttestedKey.
type RefreshAttestedKeyResp ¶
type RefreshAttestedKeyResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AttestedKeyCertificate
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
}
func ParseRefreshAttestedKeyResp ¶
func ParseRefreshAttestedKeyResp(rsp *http.Response) (*RefreshAttestedKeyResp, error)
ParseRefreshAttestedKeyResp parses an HTTP response from a RefreshAttestedKeyWithResponse call
func (RefreshAttestedKeyResp) Status ¶
func (r RefreshAttestedKeyResp) Status() string
Status returns HTTPResponse.Status
func (RefreshAttestedKeyResp) StatusCode ¶
func (r RefreshAttestedKeyResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RegisterRequest ¶
type RegisterRequest struct {
// contains filtered or unexported fields
}
RegisterRequest iOS or Android registration request. Discriminated by `attestation_type`.
func (RegisterRequest) AsRegisterRequestAndroid ¶
func (t RegisterRequest) AsRegisterRequestAndroid() (RegisterRequestAndroid, error)
AsRegisterRequestAndroid returns the union data inside the RegisterRequest as a RegisterRequestAndroid
func (RegisterRequest) AsRegisterRequestIOS ¶
func (t RegisterRequest) AsRegisterRequestIOS() (RegisterRequestIOS, error)
AsRegisterRequestIOS returns the union data inside the RegisterRequest as a RegisterRequestIOS
func (RegisterRequest) Discriminator ¶
func (t RegisterRequest) Discriminator() (string, error)
func (*RegisterRequest) FromRegisterRequestAndroid ¶
func (t *RegisterRequest) FromRegisterRequestAndroid(v RegisterRequestAndroid) error
FromRegisterRequestAndroid overwrites any union data inside the RegisterRequest as the provided RegisterRequestAndroid
func (*RegisterRequest) FromRegisterRequestIOS ¶
func (t *RegisterRequest) FromRegisterRequestIOS(v RegisterRequestIOS) error
FromRegisterRequestIOS overwrites any union data inside the RegisterRequest as the provided RegisterRequestIOS
func (RegisterRequest) MarshalJSON ¶
func (t RegisterRequest) MarshalJSON() ([]byte, error)
func (*RegisterRequest) MergeRegisterRequestAndroid ¶
func (t *RegisterRequest) MergeRegisterRequestAndroid(v RegisterRequestAndroid) error
MergeRegisterRequestAndroid performs a merge with any union data inside the RegisterRequest, using the provided RegisterRequestAndroid
func (*RegisterRequest) MergeRegisterRequestIOS ¶
func (t *RegisterRequest) MergeRegisterRequestIOS(v RegisterRequestIOS) error
MergeRegisterRequestIOS performs a merge with any union data inside the RegisterRequest, using the provided RegisterRequestIOS
func (*RegisterRequest) UnmarshalJSON ¶
func (t *RegisterRequest) UnmarshalJSON(b []byte) error
func (RegisterRequest) ValueByDiscriminator ¶
func (t RegisterRequest) ValueByDiscriminator() (interface{}, error)
type RegisterRequestAndroid ¶
type RegisterRequestAndroid struct {
// AppId iOS: teamID.bundleID; Android: package name.
AppId string `json:"app_id"`
AttestationType RegisterRequestAndroidAttestationType `json:"attestation_type"`
// AuthCertificateChain DER-encoded Android Key Attestation chain (root last) for the auth key.
AuthCertificateChain []string `json:"auth_certificate_chain"`
AuthKeyBindingAssertion string `json:"auth_key_binding_assertion"`
AuthKeyBindingChallenge string `json:"auth_key_binding_challenge"`
AuthPub string `json:"auth_pub"`
DeviceName string `json:"device_name"`
EncryptionCertificateChain []string `json:"encryption_certificate_chain"`
EncryptionKeyBindingAssertion string `json:"encryption_key_binding_assertion"`
EncryptionKeyBindingChallenge string `json:"encryption_key_binding_challenge"`
EncryptionPub string `json:"encryption_pub"`
FcmToken *string `json:"fcm_token,omitempty"`
PlayIntegrityNonce string `json:"play_integrity_nonce"`
PlayIntegrityToken string `json:"play_integrity_token"`
SigningCertificateChain []string `json:"signing_certificate_chain"`
SigningKeyBindingAssertion string `json:"signing_key_binding_assertion"`
SigningKeyBindingChallenge string `json:"signing_key_binding_challenge"`
SigningPub string `json:"signing_pub"`
}
RegisterRequestAndroid defines model for RegisterRequestAndroid.
type RegisterRequestAndroidAttestationType ¶
type RegisterRequestAndroidAttestationType string
RegisterRequestAndroidAttestationType defines model for RegisterRequestAndroid.AttestationType.
const ( RegisterRequestAndroidAttestationTypeAndroidStrongbox RegisterRequestAndroidAttestationType = "android_strongbox" RegisterRequestAndroidAttestationTypeAndroidTee RegisterRequestAndroidAttestationType = "android_tee" )
Defines values for RegisterRequestAndroidAttestationType.
func (RegisterRequestAndroidAttestationType) Valid ¶
func (e RegisterRequestAndroidAttestationType) Valid() bool
Valid indicates whether the value is a known member of the RegisterRequestAndroidAttestationType enum.
type RegisterRequestBase ¶
type RegisterRequestBase struct {
// AppId iOS: teamID.bundleID; Android: package name.
AppId string `json:"app_id"`
AttestationType RegisterRequestBaseAttestationType `json:"attestation_type"`
DeviceName string `json:"device_name"`
}
RegisterRequestBase defines model for RegisterRequestBase.
type RegisterRequestBaseAttestationType ¶
type RegisterRequestBaseAttestationType string
RegisterRequestBaseAttestationType defines model for RegisterRequestBase.AttestationType.
const ( RegisterRequestBaseAttestationTypeAndroidStrongbox RegisterRequestBaseAttestationType = "android_strongbox" RegisterRequestBaseAttestationTypeAndroidTee RegisterRequestBaseAttestationType = "android_tee" RegisterRequestBaseAttestationTypeIosSecureEnclave RegisterRequestBaseAttestationType = "ios_secure_enclave" )
Defines values for RegisterRequestBaseAttestationType.
func (RegisterRequestBaseAttestationType) Valid ¶
func (e RegisterRequestBaseAttestationType) Valid() bool
Valid indicates whether the value is a known member of the RegisterRequestBaseAttestationType enum.
type RegisterRequestIOS ¶
type RegisterRequestIOS struct {
ApnsToken *string `json:"apns_token,omitempty"`
// AppId iOS: teamID.bundleID; Android: package name.
AppId string `json:"app_id"`
// AttestationObject Base64url App Attest CBOR object.
AttestationObject string `json:"attestation_object"`
AttestationType RegisterRequestIOSAttestationType `json:"attestation_type"`
AuthKeyBindingAssertion string `json:"auth_key_binding_assertion"`
AuthKeyBindingChallenge string `json:"auth_key_binding_challenge"`
AuthPub string `json:"auth_pub"`
DeviceName string `json:"device_name"`
EncryptionKeyBindingAssertion string `json:"encryption_key_binding_assertion"`
EncryptionKeyBindingChallenge string `json:"encryption_key_binding_challenge"`
EncryptionPub string `json:"encryption_pub"`
SigningKeyBindingAssertion string `json:"signing_key_binding_assertion"`
SigningKeyBindingChallenge string `json:"signing_key_binding_challenge"`
SigningPub string `json:"signing_pub"`
}
RegisterRequestIOS defines model for RegisterRequestIOS.
type RegisterRequestIOSAttestationType ¶
type RegisterRequestIOSAttestationType string
RegisterRequestIOSAttestationType defines model for RegisterRequestIOS.AttestationType.
const (
RegisterRequestIOSAttestationTypeIosSecureEnclave RegisterRequestIOSAttestationType = "ios_secure_enclave"
)
Defines values for RegisterRequestIOSAttestationType.
func (RegisterRequestIOSAttestationType) Valid ¶
func (e RegisterRequestIOSAttestationType) Valid() bool
Valid indicates whether the value is a known member of the RegisterRequestIOSAttestationType enum.
type RegisterResponse ¶
type RegisterResponse struct {
AccessToken string `json:"access_token"`
AttestedKeyCertificate *AttestedKeyCertificate `json:"attested_key_certificate,omitempty"`
DeviceId openapi_types.UUID `json:"device_id"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
TokenType RegisterResponseTokenType `json:"token_type"`
}
RegisterResponse defines model for RegisterResponse.
type RegisterResponseTokenType ¶
type RegisterResponseTokenType string
RegisterResponseTokenType defines model for RegisterResponse.TokenType.
const (
RegisterResponseTokenTypeDPoP RegisterResponseTokenType = "DPoP"
)
Defines values for RegisterResponseTokenType.
func (RegisterResponseTokenType) Valid ¶
func (e RegisterResponseTokenType) Valid() bool
Valid indicates whether the value is a known member of the RegisterResponseTokenType enum.
type ReloginRequest ¶
type ReloginRequest struct {
ApnsToken *string `json:"apns_token,omitempty"`
// AuthPub Base64url SEC1 compressed P-256 point of the device's auth key.
AuthPub string `json:"auth_pub"`
ChallengeId string `json:"challenge_id"`
FcmToken *string `json:"fcm_token,omitempty"`
// Signature Base64url ECDSA signature over the challenge nonce.
Signature string `json:"signature"`
}
ReloginRequest defines model for ReloginRequest.
type ReloginResponse ¶
type ReloginResponse struct {
AccessToken string `json:"access_token"`
DeviceId openapi_types.UUID `json:"device_id"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
TokenType ReloginResponseTokenType `json:"token_type"`
}
ReloginResponse defines model for ReloginResponse.
type ReloginResponseTokenType ¶
type ReloginResponseTokenType string
ReloginResponseTokenType defines model for ReloginResponse.TokenType.
const (
ReloginResponseTokenTypeDPoP ReloginResponseTokenType = "DPoP"
)
Defines values for ReloginResponseTokenType.
func (ReloginResponseTokenType) Valid ¶
func (e ReloginResponseTokenType) Valid() bool
Valid indicates whether the value is a known member of the ReloginResponseTokenType enum.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RevokePairingParams ¶
type RevokePairingParams struct {
// XRequestID Optional client-supplied correlation identifier.
XRequestID *XRequestID `json:"X-Request-ID,omitempty"`
// DPoP DPoP proof JWT per RFC 9449 §4. The server validates `htm`, `htu`,
// `iat`, `jti`, `typ=dpop+jwt`, `alg` (must be ES256), and the embedded
// `jwk`. For protected routes, the proof's JWK thumbprint must equal
// the token's server-side DPoP binding metadata.
DPoP DPoPHeader `json:"DPoP"`
}
RevokePairingParams defines parameters for RevokePairing.
type RevokePairingResp ¶
type RevokePairingResp struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON401 *Unauthorized
ApplicationproblemJSON403 *Forbidden
ApplicationproblemJSON404 *NotFound
}
func ParseRevokePairingResp ¶
func ParseRevokePairingResp(rsp *http.Response) (*RevokePairingResp, error)
ParseRevokePairingResp parses an HTTP response from a RevokePairingWithResponse call
func (RevokePairingResp) Status ¶
func (r RevokePairingResp) Status() string
Status returns HTTPResponse.Status
func (RevokePairingResp) StatusCode ¶
func (r RevokePairingResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type TokenRequest ¶
type TokenRequest struct {
ClientId *string `json:"client_id,omitempty"`
// Code Required for grant_type=authorization_code.
Code *string `json:"code,omitempty"`
// CodeVerifier PKCE verifier for authorization_code.
CodeVerifier *string `json:"code_verifier,omitempty"`
// DeviceCode Required for the device_code grant.
DeviceCode *string `json:"device_code,omitempty"`
GrantType TokenRequestGrantType `json:"grant_type"`
RedirectUri *string `json:"redirect_uri,omitempty"`
// RefreshToken Required for grant_type=refresh_token.
RefreshToken *string `json:"refresh_token,omitempty"`
Scope *string `json:"scope,omitempty"`
}
TokenRequest defines model for TokenRequest.
type TokenRequestGrantType ¶
type TokenRequestGrantType string
TokenRequestGrantType defines model for TokenRequest.GrantType.
const ( AuthorizationCode TokenRequestGrantType = "authorization_code" RefreshToken TokenRequestGrantType = "refresh_token" UrnIetfParamsOauthGrantTypeDeviceCode TokenRequestGrantType = "urn:ietf:params:oauth:grant-type:device_code" )
Defines values for TokenRequestGrantType.
func (TokenRequestGrantType) Valid ¶
func (e TokenRequestGrantType) Valid() bool
Valid indicates whether the value is a known member of the TokenRequestGrantType enum.
type TokenResponse ¶
type TokenResponse struct {
// AccessToken Opaque DPoP-bound access-token handle.
AccessToken string `json:"access_token"`
// ExpiresIn Lifetime in seconds.
ExpiresIn int `json:"expires_in"`
// IdToken Not issued to requester device-code clients; avoid requesting openid for requester flows.
IdToken *string `json:"id_token,omitempty"`
// RefreshToken Issued when the request includes the offline_access scope. The refresh token itself is bound to the same `jkt` for the lifetime of the token family.
RefreshToken *string `json:"refresh_token,omitempty"`
Scope *string `json:"scope,omitempty"`
// TokenType Always `DPoP` for tokens issued by NaughtBot auth.
TokenType TokenResponseTokenType `json:"token_type"`
}
TokenResponse DPoP-bound token response (RFC 9449 §5). The access token is opaque; its DPoP key binding, audience, scopes, and internal subject are stored server-side and resolved only through auth's internal mTLS introspection endpoint.
type TokenResponseTokenType ¶
type TokenResponseTokenType string
TokenResponseTokenType Always `DPoP` for tokens issued by NaughtBot auth.
const (
DPoP TokenResponseTokenType = "DPoP"
)
Defines values for TokenResponseTokenType.
func (TokenResponseTokenType) Valid ¶
func (e TokenResponseTokenType) Valid() bool
Valid indicates whether the value is a known member of the TokenResponseTokenType enum.
type TooManyRequests ¶
type TooManyRequests = ProblemDetails
TooManyRequests RFC 9457 problem details object.
type Unauthorized ¶
type Unauthorized = ProblemDetails
Unauthorized RFC 9457 problem details object.
type UnprocessableEntity ¶
type UnprocessableEntity = ProblemDetails
UnprocessableEntity RFC 9457 problem details object.