Liking cljdoc? Tell your friends :D

happyapi.oauth2.client


checkclj

(check config)
source

endpointscljmultimethod

source

make-clientclj

(make-client {:as config :keys [keywordize-keys] {:keys [request]} :fns})

Given a config map

{#{:client_id :client_secret} <string> :provider #{:google :amazon :github :twitter ...} #{:auth_uri :token_uri} <string> :fns {#{:request :query-string :encode :decode} <fn-or-var>} :keywordize-keys <boolean>}

Returns a wrapped request function.

If provider is known, then auth_uri and token_uri endpoints will be added to the config, otherwise expects auth_uri and token_uri. provider is required to namespace tokens, but is not restricted to known providers. Dependencies are passed as functions in fns.

Given a config map

{#{:client_id :client_secret}  <string>
 :provider                     #{:google :amazon :github :twitter ...}
 #{:auth_uri :token_uri}       <string>
 :fns                          {#{:request :query-string :encode :decode} <fn-or-var>}
 :keywordize-keys              <boolean>}

Returns a wrapped request function.

If `provider` is known, then auth_uri and token_uri endpoints will be added to the config,
otherwise expects `auth_uri` and `token_uri`.
`provider` is required to namespace tokens, but is not restricted to known providers.
Dependencies are passed as functions in `fns`.
sourceraw docstring

missing-configclj

(missing-config config)
source

oauth2clj

(oauth2 request args config)

Performs a http-request that includes oauth2 credentials. Will obtain fresh credentials prior to the request if necessary. See https://developers.google.com/identity/protocols/oauth2 for more information.

Performs a http-request that includes oauth2 credentials.
Will obtain fresh credentials prior to the request if necessary.
See https://developers.google.com/identity/protocols/oauth2 for more information.
sourceraw docstring

oauth2-asyncclj

(oauth2-async request args config respond raise)

Only the http request is asynchronous; reading, updating, or writing credentials is done synchronously. Asynchronously obtaining credentials is challenging because it may rely on waiting for a redirect back. This compromise allows for convenient usage, but means that calls may block while authorizing before the http request is made.

Only the http request is asynchronous; reading, updating, or writing credentials is done synchronously.
Asynchronously obtaining credentials is challenging because it may rely on waiting for a redirect back.
This compromise allows for convenient usage, but means that calls may block while authorizing before
the http request is made.
sourceraw docstring

required-configclj

source

with-credential-fnsclj

(with-credential-fns config)
source

with-endpointsclj

(with-endpoints {:as config :keys [provider]})

The only configuration required is to know the provider (for endpoints), the client-id and the client-secret. This helper adds the endpoints for a given provider.

The only configuration required is to know the provider (for endpoints),
the client-id and the client-secret.
This helper adds the endpoints for a given provider.
sourceraw docstring

wrap-oauth2clj

(wrap-oauth2 request config)

Wraps an http-request function that uses keys user and scopes from args to authorize according to config.

Wraps an http-request function that uses keys user and scopes from args to authorize according to config.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close