|
| 1 | +module OAuth2 |
| 2 | + class Client |
| 3 | + RESERVED_REQ_KEYS: Array[String] |
| 4 | + RESERVED_PARAM_KEYS: Array[String] |
| 5 | + |
| 6 | + include OAuth2::FilteredAttributes |
| 7 | + |
| 8 | + attr_reader id: String |
| 9 | + attr_reader secret: String |
| 10 | + attr_reader site: String? |
| 11 | + attr_accessor options: Hash[Symbol, untyped] |
| 12 | + attr_writer connection: untyped |
| 13 | + |
| 14 | + def initialize: (String client_id, String client_secret, ?Hash[Symbol, untyped]) { (untyped) -> void } -> void |
| 15 | + |
| 16 | + def site=: (String) -> String |
| 17 | + |
| 18 | + def connection: () -> untyped |
| 19 | + |
| 20 | + def authorize_url: (?Hash[untyped, untyped]) -> String |
| 21 | + def token_url: (?Hash[untyped, untyped]) -> String |
| 22 | + def revoke_url: (?Hash[untyped, untyped]) -> String |
| 23 | + |
| 24 | + def request: (Symbol verb, String url, ?Hash[Symbol, untyped]) { (untyped) -> void } -> OAuth2::Response |
| 25 | + |
| 26 | + def get_token: (Hash[untyped, untyped] params, ?Hash[Symbol, untyped] access_token_opts, ?Proc) { (Hash[Symbol, untyped]) -> void } -> (OAuth2::AccessToken | nil) |
| 27 | + |
| 28 | + def revoke_token: (String token, ?String token_type_hint, ?Hash[Symbol, untyped]) { (untyped) -> void } -> OAuth2::Response |
| 29 | + |
| 30 | + def http_method: () -> Symbol |
| 31 | + |
| 32 | + def auth_code: () -> OAuth2::Strategy::AuthCode |
| 33 | + def implicit: () -> OAuth2::Strategy::Implicit |
| 34 | + def password: () -> OAuth2::Strategy::Password |
| 35 | + def client_credentials: () -> OAuth2::Strategy::ClientCredentials |
| 36 | + def assertion: () -> OAuth2::Strategy::Assertion |
| 37 | + |
| 38 | + def redirection_params: () -> Hash[String, String] |
| 39 | + |
| 40 | + private |
| 41 | + |
| 42 | + def params_to_req_opts: (Hash[untyped, untyped]) -> Hash[Symbol, untyped] |
| 43 | + def parse_snaky_params_headers: (Hash[untyped, untyped]) -> [Symbol, bool, untyped, (Symbol | nil), Hash[untyped, untyped], Hash[String, String]] |
| 44 | + def execute_request: (Symbol verb, String url, ?Hash[Symbol, untyped]) { (Faraday::Request) -> void } -> OAuth2::Response |
| 45 | + def authenticator: () -> OAuth2::Authenticator |
| 46 | + def parse_response_legacy: (OAuth2::Response, Hash[Symbol, untyped], Proc) -> (OAuth2::AccessToken | nil) |
| 47 | + def parse_response: (OAuth2::Response, Hash[Symbol, untyped]) -> (OAuth2::AccessToken | nil) |
| 48 | + def build_access_token: (OAuth2::Response, Hash[Symbol, untyped], untyped) -> OAuth2::AccessToken |
| 49 | + def build_access_token_legacy: (OAuth2::Response, Hash[Symbol, untyped], Proc) -> (OAuth2::AccessToken | nil) |
| 50 | + def oauth_debug_logging: (untyped) -> void |
| 51 | + end |
| 52 | +end |
0 commit comments