class Vk::Auth

Defined in:

vk_auth.cr

Constant 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

Instance Method Summary

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


[View source]

Instance Method Detail

def authorized? #

[View source]
def get_token(email : String, password : String, *, permissions = [] of String, revoke = false) #

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

[View source]
def token : NamedTuple(access_token: String, expires_in: String, user_id: String) | Nil #

[View source]