Documentation
¶
Index ¶
- Constants
- type Api
- type Client
- func (c *Client) EncryptAccountPassword(ctx context.Context, accountName string, password string) (EncryptedPassword, error)
- func (c *Client) GenerateAccessTokenForApp(ctx context.Context, refreshToken string, renew bool) (*steamproto.CAuthentication_AccessToken_GenerateForApp_Response, error)
- func (c *Client) GetPublicRsaKey(ctx context.Context, accountName string) (*PublicRsaKey, error)
- func (c *Client) PollSessionStatus(ctx context.Context, clientID uint64, requestID []byte) (*steamproto.CAuthentication_PollAuthSessionStatus_Response, error)
- func (c *Client) StartSessionWithCredentials(ctx context.Context, accountName string, password EncryptedPassword, ...) (*steamproto.CAuthentication_BeginAuthSessionViaCredentials_Response, error)
- func (c *Client) SubmitSteamGuardCode(ctx context.Context, clientID uint64, steamID steamid.SteamID, code string) error
- type DeviceDetails
- type EncryptedPassword
- type GenerateAccessTokenRequest
- func (r GenerateAccessTokenRequest) CacheTTL() time.Duration
- func (r GenerateAccessTokenRequest) EnsureResponseSuccess(httpResponse *http.Response) error
- func (r GenerateAccessTokenRequest) Headers() (http.Header, error)
- func (r GenerateAccessTokenRequest) Method() string
- func (r GenerateAccessTokenRequest) OldValues() (url.Values, error)
- func (r GenerateAccessTokenRequest) RequiresApiKey() bool
- func (r GenerateAccessTokenRequest) Retryable() bool
- func (r GenerateAccessTokenRequest) Url() string
- func (r GenerateAccessTokenRequest) Values() (url.Values, error)
- type GenerateAccessTokenResponse
- type GetRsaKeyRequest
- func (g GetRsaKeyRequest) CacheTTL() time.Duration
- func (g GetRsaKeyRequest) EnsureResponseSuccess(httpResponse *http.Response) error
- func (g GetRsaKeyRequest) Headers() (http.Header, error)
- func (g GetRsaKeyRequest) Method() string
- func (g GetRsaKeyRequest) OldValues() (url.Values, error)
- func (g GetRsaKeyRequest) RequiresApiKey() bool
- func (g GetRsaKeyRequest) Retryable() bool
- func (g GetRsaKeyRequest) Url() string
- func (g GetRsaKeyRequest) Values() (url.Values, error)
- type GetRsaKeyResponse
- type GuardType
- type Persistence
- type PlatformType
- type PollSessionStatusRequest
- func (r PollSessionStatusRequest) CacheTTL() time.Duration
- func (r PollSessionStatusRequest) EnsureResponseSuccess(httpResponse *http.Response) error
- func (r PollSessionStatusRequest) Headers() (http.Header, error)
- func (r PollSessionStatusRequest) Method() string
- func (r PollSessionStatusRequest) OldValues() (url.Values, error)
- func (r PollSessionStatusRequest) RequiresApiKey() bool
- func (r PollSessionStatusRequest) Retryable() bool
- func (r PollSessionStatusRequest) Url() string
- func (r PollSessionStatusRequest) Values() (url.Values, error)
- type PollSessionStatusResponse
- type PublicRsaKey
- type RefreshJwt
- type StartSessionRequest
- func (r StartSessionRequest) CacheTTL() time.Duration
- func (r StartSessionRequest) EnsureResponseSuccess(httpResponse *http.Response) error
- func (r StartSessionRequest) Headers() (http.Header, error)
- func (r StartSessionRequest) Method() string
- func (r StartSessionRequest) OldValues() (url.Values, error)
- func (r StartSessionRequest) RequiresApiKey() bool
- func (r StartSessionRequest) Retryable() bool
- func (r StartSessionRequest) Url() string
- func (r StartSessionRequest) Values() (url.Values, error)
- type StartSessionResponse
- type TokenRenewalType
- type UpdateSessionWithSteamGuardCodeRequest
- func (r UpdateSessionWithSteamGuardCodeRequest) CacheTTL() time.Duration
- func (r UpdateSessionWithSteamGuardCodeRequest) EnsureResponseSuccess(httpResponse *http.Response) error
- func (r UpdateSessionWithSteamGuardCodeRequest) Headers() (http.Header, error)
- func (r UpdateSessionWithSteamGuardCodeRequest) Method() string
- func (r UpdateSessionWithSteamGuardCodeRequest) OldValues() (url.Values, error)
- func (r UpdateSessionWithSteamGuardCodeRequest) RequiresApiKey() bool
- func (r UpdateSessionWithSteamGuardCodeRequest) Retryable() bool
- func (r UpdateSessionWithSteamGuardCodeRequest) Url() string
- func (r UpdateSessionWithSteamGuardCodeRequest) Values() (url.Values, error)
Constants ¶
View Source
const ( AndroidUnknownOsType int32 = -500 DefaultGamingDeviceType = 528 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api interface {
GetPublicRsaKey(ctx context.Context, accountName string) (PublicRsaKey, error)
EncryptAccountPassword(ctx context.Context, accountName string, password string) (EncryptedPassword, error)
StartSessionWithCredentials(
ctx context.Context,
accountName string,
password EncryptedPassword,
deviceDetails DeviceDetails,
) (*steamproto.CAuthentication_BeginAuthSessionViaCredentials_Response, error)
SubmitSteamGuardCode(ctx context.Context, clientID string, steamID steamid.SteamID, code string) error
PollSessionStatus(ctx context.Context, clientID string, requestID string) (PollSessionStatusResponse, error)
GenerateAccessTokenForApp(ctx context.Context, refreshToken string, renew bool) (GenerateAccessTokenResponse, error)
}
type Client ¶
func (*Client) EncryptAccountPassword ¶
func (c *Client) EncryptAccountPassword( ctx context.Context, accountName string, password string, ) (EncryptedPassword, error)
EncryptAccountPassword Retrieves the RSA key for the specified accountName, and encrypted the given password using the RSA key.
func (*Client) GenerateAccessTokenForApp ¶
func (c *Client) GenerateAccessTokenForApp( ctx context.Context, refreshToken string, renew bool, ) (*steamproto.CAuthentication_AccessToken_GenerateForApp_Response, error)
func (*Client) GetPublicRsaKey ¶
func (*Client) PollSessionStatus ¶
func (c *Client) PollSessionStatus( ctx context.Context, clientID uint64, requestID []byte, ) (*steamproto.CAuthentication_PollAuthSessionStatus_Response, error)
func (*Client) StartSessionWithCredentials ¶
func (c *Client) StartSessionWithCredentials( ctx context.Context, accountName string, password EncryptedPassword, deviceDetails DeviceDetails, ) (*steamproto.CAuthentication_BeginAuthSessionViaCredentials_Response, error)
type DeviceDetails ¶
type DeviceDetails struct {
FriendlyName string `json:"device_friendly_name"`
PlatformType steamproto.EAuthTokenPlatformType `json:"platform_type"`
OsType int32 `json:"os_type"`
GamingDeviceType uint32 `json:"gaming_device_type"`
}
type EncryptedPassword ¶
type GenerateAccessTokenRequest ¶
type GenerateAccessTokenRequest struct {
RefreshToken string `json:"refresh_token"`
SteamID steamid.SteamID `json:"steamid"`
RenewalType TokenRenewalType `json:"renewal_type"`
}
func (GenerateAccessTokenRequest) CacheTTL ¶
func (r GenerateAccessTokenRequest) CacheTTL() time.Duration
func (GenerateAccessTokenRequest) EnsureResponseSuccess ¶
func (r GenerateAccessTokenRequest) EnsureResponseSuccess(httpResponse *http.Response) error
func (GenerateAccessTokenRequest) Headers ¶
func (r GenerateAccessTokenRequest) Headers() (http.Header, error)
func (GenerateAccessTokenRequest) Method ¶
func (r GenerateAccessTokenRequest) Method() string
func (GenerateAccessTokenRequest) OldValues ¶
func (r GenerateAccessTokenRequest) OldValues() (url.Values, error)
func (GenerateAccessTokenRequest) RequiresApiKey ¶
func (r GenerateAccessTokenRequest) RequiresApiKey() bool
func (GenerateAccessTokenRequest) Retryable ¶
func (r GenerateAccessTokenRequest) Retryable() bool
func (GenerateAccessTokenRequest) Url ¶
func (r GenerateAccessTokenRequest) Url() string
type GetRsaKeyRequest ¶
type GetRsaKeyRequest struct {
// contains filtered or unexported fields
}
func (GetRsaKeyRequest) CacheTTL ¶
func (g GetRsaKeyRequest) CacheTTL() time.Duration
func (GetRsaKeyRequest) EnsureResponseSuccess ¶
func (g GetRsaKeyRequest) EnsureResponseSuccess(httpResponse *http.Response) error
func (GetRsaKeyRequest) Method ¶
func (g GetRsaKeyRequest) Method() string
func (GetRsaKeyRequest) RequiresApiKey ¶
func (g GetRsaKeyRequest) RequiresApiKey() bool
func (GetRsaKeyRequest) Retryable ¶
func (g GetRsaKeyRequest) Retryable() bool
func (GetRsaKeyRequest) Url ¶
func (g GetRsaKeyRequest) Url() string
type GetRsaKeyResponse ¶
type Persistence ¶
type Persistence int
const ( InvalidSessionPersistence Persistence = -1 EphemeralSessionPersistence Persistence = 0 PersistentSessionPersistence Persistence = 1 )
type PlatformType ¶
type PlatformType int
const ( UnknownPlatformType PlatformType = iota SteamClientPlatformType WebBrowserPlatformType MobileAppPlatformType )
type PollSessionStatusRequest ¶
func (PollSessionStatusRequest) CacheTTL ¶
func (r PollSessionStatusRequest) CacheTTL() time.Duration
func (PollSessionStatusRequest) EnsureResponseSuccess ¶
func (r PollSessionStatusRequest) EnsureResponseSuccess(httpResponse *http.Response) error
func (PollSessionStatusRequest) Headers ¶
func (r PollSessionStatusRequest) Headers() (http.Header, error)
func (PollSessionStatusRequest) Method ¶
func (r PollSessionStatusRequest) Method() string
func (PollSessionStatusRequest) OldValues ¶
func (r PollSessionStatusRequest) OldValues() (url.Values, error)
func (PollSessionStatusRequest) RequiresApiKey ¶
func (r PollSessionStatusRequest) RequiresApiKey() bool
func (PollSessionStatusRequest) Retryable ¶
func (r PollSessionStatusRequest) Retryable() bool
func (PollSessionStatusRequest) Url ¶
func (r PollSessionStatusRequest) Url() string
type PollSessionStatusResponse ¶
type PollSessionStatusResponse struct {
Response struct {
NewClientID string `json:"new_client_id,omitempty"`
NewChallenge string `json:"new_challenge,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
AccessToken string `json:"access_token,omitempty"`
HadRemoteInteraction bool `json:"had_remote_interaction,omitempty"`
AccountName string `json:"account_name,omitempty"`
} `json:"response"`
}
type PublicRsaKey ¶
type RefreshJwt ¶
type RefreshJwt struct {
Sub string `json:"sub"`
Iat int64 `json:"iat,omitempty"`
Exp int64 `json:"exp,omitempty"`
}
func DecodeSimpleJwt ¶
func DecodeSimpleJwt(jwtString string) (RefreshJwt, error)
type StartSessionRequest ¶
type StartSessionRequest struct {
AccountName string
EncryptedPassword string
EncryptionTimestamp uint64
Persistence steamproto.ESessionPersistence
DeviceDetails DeviceDetails
Language uint32
QosLevel int32
}
func (StartSessionRequest) CacheTTL ¶
func (r StartSessionRequest) CacheTTL() time.Duration
func (StartSessionRequest) EnsureResponseSuccess ¶
func (r StartSessionRequest) EnsureResponseSuccess(httpResponse *http.Response) error
func (StartSessionRequest) Method ¶
func (r StartSessionRequest) Method() string
func (StartSessionRequest) RequiresApiKey ¶
func (r StartSessionRequest) RequiresApiKey() bool
func (StartSessionRequest) Retryable ¶
func (r StartSessionRequest) Retryable() bool
func (StartSessionRequest) Url ¶
func (r StartSessionRequest) Url() string
type StartSessionResponse ¶
type StartSessionResponse struct {
Response struct {
ClientId string `json:"client_id"`
RequestId string `json:"request_id"`
Interval int `json:"interval"`
SteamId string `json:"steam_id"`
WeakToken string `json:"weak_token,omitempty"`
AgreementSessionUrl string `json:"agreement_session_url,omitempty"`
ExtendedErrorMessage string `json:"extended_error_message,omitempty"`
AllowedConfirmations []struct {
ConfirmationType GuardType `json:"confirmation_type"`
AssociatedMessage string `json:"associated_message,omitempty"`
} `json:"allowed_confirmations,omitempty"`
} `json:"response"`
}
type TokenRenewalType ¶
type TokenRenewalType int
const ( NoneRenewalType TokenRenewalType = iota AllowRenewalType )
type UpdateSessionWithSteamGuardCodeRequest ¶
type UpdateSessionWithSteamGuardCodeRequest struct {
ClientID uint64
SteamID string
Code string
CodeType GuardType
}
func (UpdateSessionWithSteamGuardCodeRequest) CacheTTL ¶
func (r UpdateSessionWithSteamGuardCodeRequest) CacheTTL() time.Duration
func (UpdateSessionWithSteamGuardCodeRequest) EnsureResponseSuccess ¶
func (r UpdateSessionWithSteamGuardCodeRequest) EnsureResponseSuccess(httpResponse *http.Response) error
func (UpdateSessionWithSteamGuardCodeRequest) Headers ¶
func (r UpdateSessionWithSteamGuardCodeRequest) Headers() (http.Header, error)
func (UpdateSessionWithSteamGuardCodeRequest) Method ¶
func (r UpdateSessionWithSteamGuardCodeRequest) Method() string
func (UpdateSessionWithSteamGuardCodeRequest) OldValues ¶
func (r UpdateSessionWithSteamGuardCodeRequest) OldValues() (url.Values, error)
func (UpdateSessionWithSteamGuardCodeRequest) RequiresApiKey ¶
func (r UpdateSessionWithSteamGuardCodeRequest) RequiresApiKey() bool
func (UpdateSessionWithSteamGuardCodeRequest) Retryable ¶
func (r UpdateSessionWithSteamGuardCodeRequest) Retryable() bool
func (UpdateSessionWithSteamGuardCodeRequest) Url ¶
func (r UpdateSessionWithSteamGuardCodeRequest) Url() string
Click to show internal directories.
Click to hide internal directories.