summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/api/auth.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-01-28 23:48:40 +0100
committerGitHub <noreply@github.com>2022-01-28 23:48:40 +0100
commit5a1fd7daddbb07b93e3611d023ea48e1991fc0c6 (patch)
treee592a99163702c4c6214c9519a7983fa58fab13c /vendor/github.com/SevereCloud/vksdk/v2/api/auth.go
parentac06a268096285a9f795bd19df950075a930c9d6 (diff)
downloadmatterbridge-msglm-5a1fd7daddbb07b93e3611d023ea48e1991fc0c6.tar.gz
matterbridge-msglm-5a1fd7daddbb07b93e3611d023ea48e1991fc0c6.tar.bz2
matterbridge-msglm-5a1fd7daddbb07b93e3611d023ea48e1991fc0c6.zip
Bump github.com/SevereCloud/vksdk/v2 from 2.11.0 to 2.13.0 (#1698)
Bumps [github.com/SevereCloud/vksdk/v2](https://github.com/SevereCloud/vksdk) from 2.11.0 to 2.13.0. - [Release notes](https://github.com/SevereCloud/vksdk/releases) - [Commits](https://github.com/SevereCloud/vksdk/compare/v2.11.0...v2.13.0) --- updated-dependencies: - dependency-name: github.com/SevereCloud/vksdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/api/auth.go')
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/auth.go59
1 files changed, 59 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/auth.go b/vendor/github.com/SevereCloud/vksdk/v2/api/auth.go
index f927a6ff..62a08c07 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/api/auth.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/auth.go
@@ -1,5 +1,9 @@
package api // import "github.com/SevereCloud/vksdk/v2/api"
+import (
+ "github.com/SevereCloud/vksdk/v2/object"
+)
+
// AuthCheckPhone checks a user's phone number for correctness.
//
// https://vk.com/dev/auth.checkPhone
@@ -24,3 +28,58 @@ func (vk *VK) AuthRestore(params Params) (response AuthRestoreResponse, err erro
err = vk.RequestUnmarshal("auth.restore", &response, params)
return
}
+
+// AuthGetProfileInfoBySilentTokenResponse struct.
+type AuthGetProfileInfoBySilentTokenResponse struct {
+ Success []object.AuthSilentTokenProfile `json:"success"`
+ Errors []AuthSilentTokenError `json:"errors"`
+}
+
+// AuthGetProfileInfoBySilentToken method.
+//
+// https://platform.vk.com/?p=DocsDashboard&docs=tokens_silent-token
+func (vk *VK) AuthGetProfileInfoBySilentToken(params Params) (response AuthGetProfileInfoBySilentTokenResponse, err error) {
+ err = vk.RequestUnmarshal("auth.getProfileInfoBySilentToken", &response, params)
+ return
+}
+
+// ExchangeSilentTokenSource call conditions exchangeSilentToken.
+//
+// 0 Unknown
+// 1 Silent authentication
+// 2 Auth by login and password
+// 3 Extended registration
+// 4 Auth by exchange token
+// 5 Auth by exchange token on reset password
+// 6 Auth by exchange token on unblock
+// 7 Auth by exchange token on reset session
+// 8 Auth by exchange token on change password
+// 9 Finish phone validation on authentication
+// 10 Auth by code
+// 11 Auth by external oauth
+// 12 Reactivation
+// 15 Auth by SDK temporary access-token
+type ExchangeSilentTokenSource int
+
+// AuthExchangeSilentAuthTokenResponse struct.
+type AuthExchangeSilentAuthTokenResponse struct {
+ AccessToken string `json:"access_token"`
+ AccessTokenID string `json:"access_token_id"`
+ UserID int `json:"user_id"`
+ Phone string `json:"phone"`
+ PhoneValidated interface{} `json:"phone_validated"`
+ IsPartial bool `json:"is_partial"`
+ IsService bool `json:"is_service"`
+ AdditionalSignupRequired bool `json:"additional_signup_required"`
+ Email string `json:"email"`
+ Source ExchangeSilentTokenSource `json:"source"`
+ SourceDescription string `json:"source_description"`
+}
+
+// AuthExchangeSilentAuthToken method.
+//
+// https://platform.vk.com/?p=DocsDashboard&docs=tokens_access-token
+func (vk *VK) AuthExchangeSilentAuthToken(params Params) (response AuthExchangeSilentAuthTokenResponse, err error) {
+ err = vk.RequestUnmarshal("auth.exchangeSilentAuthToken", &response, params)
+ return
+}