View Source Ueberauth.Strategy.Orcid (ueberauth_orcid v0.3.0)
ORCID authorization-code authentication through Ueberauth.
The default identity is the nonblank sub claim. Optional name claims may be
absent; email is not mapped or used as an identity fallback. Granted scopes,
not requested scopes, populate the returned credentials.
A custom :oauth2_module must implement authorize_url!/2, get_token/2
returning a token result tuple, and get/4 returning an OAuth2 response tuple.
All three authentication stages use that module.
Configure an explicit trusted :callback_url. Without it, Ueberauth derives
the URL using connection data and Host/forwarded headers; the host application
must validate the host and strip untrusted forwarding headers at its proxy
boundary. With :send_redirect_uri disabled, configure the OAuth client's
redirect URI explicitly.
Credentials and extra.raw_info.token intentionally contain secrets.
Never log the complete auth struct or raw provider data.
Summary
Functions
Returns granted scopes and the provider's optional refresh/expiry values.
Callback implementation for Ueberauth.Strategy.default_options/0.
Returns raw userinfo and the token for compatibility with existing consumers. This data is sensitive even after temporary connection fields are cleaned.
Exchanges the code and validates userinfo after Ueberauth checks state.
Removes temporary provider data after both successful and failed callbacks.
Redirects to ORCID with Ueberauth's state and the effective callback URI.
Joins valid given/family names, falling back to the credit-name claim name.
The credit name remains the nickname. Missing names and email remain nil.
Returns the validated :uid_field claim, which defaults to :sub.
Functions
@spec credentials(Plug.Conn.t()) :: Ueberauth.Auth.Credentials.t()
Returns granted scopes and the provider's optional refresh/expiry values.
Callback implementation for Ueberauth.Strategy.default_options/0.
@spec extra(Plug.Conn.t()) :: Ueberauth.Auth.Extra.t()
Returns raw userinfo and the token for compatibility with existing consumers. This data is sensitive even after temporary connection fields are cleaned.
@spec handle_callback!(Plug.Conn.t()) :: Plug.Conn.t()
Exchanges the code and validates userinfo after Ueberauth checks state.
@spec handle_cleanup!(Plug.Conn.t()) :: Plug.Conn.t()
Removes temporary provider data after both successful and failed callbacks.
@spec handle_request!(Plug.Conn.t()) :: Plug.Conn.t()
Redirects to ORCID with Ueberauth's state and the effective callback URI.
@spec info(Plug.Conn.t()) :: Ueberauth.Auth.Info.t()
Joins valid given/family names, falling back to the credit-name claim name.
The credit name remains the nickname. Missing names and email remain nil.
@spec uid(Plug.Conn.t()) :: String.t()
Returns the validated :uid_field claim, which defaults to :sub.