class Vk::Auth
- Vk::Auth
- Reference
- Object
Defined in:
vk_auth.crConstant Summary
-
AUTHORIZE_URL =
"https://oauth.vk.com/authorize"
-
DISPLAY =
"mobile"
-
Log =
Vk::Log.for(self)
-
REDIRECT_URI =
"https://oauth.vk.com/blank.html"
-
RESPONSE_TYPE =
"token"
-
USER_AGENT =
"Opera/9.80 (Android; Opera Mini/7.5.33942/191.308; U; en) Presto/2.12.423 Version/12.16"
-
VERSION =
{{ (`shards version /srv/crystaldoc.info/github-mamantoha-vk_auth-main/src`).chomp.stringify }}
Constructors
-
.new(client_id : String, *, api_version : String = Vk::API_VERSION, user_agent : String = USER_AGENT)
Implicit Flow for User Access Token
Instance Method Summary
- #authorized?
-
#get_token(email : String, password : String, *, permissions = [] of String, revoke = false)
Additinal parameters:
- #token : NamedTuple(access_token: String, expires_in: String, user_id: String) | Nil
Constructor Detail
def self.new(client_id : String, *, api_version : String = Vk::API_VERSION, user_agent : String = USER_AGENT)
#
Implicit Flow for User Access Token
https://vk.com/dev/implicit_flow_user
Instance Method Detail
Additinal parameters:
permissions
- Access Permissions for User Token (https://vk.com/dev/permissions)revoke
- Sets that permissions request should not be skipped even if a user is already authorized
def token : NamedTuple(access_token: String, expires_in: String, user_id: String) | Nil
#