File: client.rbs

package info (click to toggle)
ruby-oauth2 2.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,608 kB
  • sloc: ruby: 5,441; javascript: 529; makefile: 4; sh: 4
file content (52 lines) | stat: -rw-r--r-- 2,351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module OAuth2
  class Client
    RESERVED_REQ_KEYS: Array[String]
    RESERVED_PARAM_KEYS: Array[String]

    include OAuth2::FilteredAttributes

    attr_reader id: String
    attr_reader secret: String
    attr_reader site: String?
    attr_accessor options: Hash[Symbol, untyped]
    attr_writer connection: untyped

    def initialize: (String client_id, String client_secret, ?Hash[Symbol, untyped]) { (untyped) -> void } -> void

    def site=: (String) -> String

    def connection: () -> untyped

    def authorize_url: (?Hash[untyped, untyped]) -> String
    def token_url: (?Hash[untyped, untyped]) -> String
    def revoke_url: (?Hash[untyped, untyped]) -> String

    def request: (Symbol verb, String url, ?Hash[Symbol, untyped]) { (untyped) -> void } -> OAuth2::Response

    def get_token: (Hash[untyped, untyped] params, ?Hash[Symbol, untyped] access_token_opts, ?Proc) { (Hash[Symbol, untyped]) -> void } -> (OAuth2::AccessToken | nil)

    def revoke_token: (String token, ?String token_type_hint, ?Hash[Symbol, untyped]) { (untyped) -> void } -> OAuth2::Response

    def http_method: () -> Symbol

    def auth_code: () -> OAuth2::Strategy::AuthCode
    def implicit: () -> OAuth2::Strategy::Implicit
    def password: () -> OAuth2::Strategy::Password
    def client_credentials: () -> OAuth2::Strategy::ClientCredentials
    def assertion: () -> OAuth2::Strategy::Assertion

    def redirection_params: () -> Hash[String, String]

    private

    def params_to_req_opts: (Hash[untyped, untyped]) -> Hash[Symbol, untyped]
    def parse_snaky_params_headers: (Hash[untyped, untyped]) -> [Symbol, bool, untyped, (Symbol | nil), Hash[untyped, untyped], Hash[String, String]]
    def execute_request: (Symbol verb, String url, ?Hash[Symbol, untyped]) { (Faraday::Request) -> void } -> OAuth2::Response
    def authenticator: () -> OAuth2::Authenticator
    def parse_response_legacy: (OAuth2::Response, Hash[Symbol, untyped], Proc) -> (OAuth2::AccessToken | nil)
    def parse_response: (OAuth2::Response, Hash[Symbol, untyped]) -> (OAuth2::AccessToken | nil)
    def build_access_token: (OAuth2::Response, Hash[Symbol, untyped], untyped) -> OAuth2::AccessToken
    def build_access_token_legacy: (OAuth2::Response, Hash[Symbol, untyped], Proc) -> (OAuth2::AccessToken | nil)
    def oauth_debug_logging: (untyped) -> void
  end
end