View Source ExOauth2Provider.RedirectURI (ExOauth2Provider v0.5.7)

Functions for dealing with redirect uri.

Summary

Functions

Check if uri matches client uri

Check if a url is native

Adds query parameters to uri

Check if a url matches a client redirect_uri

Validates if a url can be used as a redirect_uri.

Functions

Link to this function

matches?(uri, client_uri, config)

View Source
@spec matches?(binary(), binary(), keyword()) :: boolean()
@spec matches?(URI.t(), URI.t(), keyword()) :: boolean()

Check if uri matches client uri

Link to this function

native_redirect_uri?(url, config)

View Source
@spec native_redirect_uri?(
  binary(),
  keyword()
) :: boolean()

Check if a url is native

Link to this function

uri_with_query(uri, query)

View Source
@spec uri_with_query(binary() | URI.t(), map()) :: binary()

Adds query parameters to uri

Link to this function

valid_for_authorization?(url, client_url, config)

View Source
@spec valid_for_authorization?(binary(), binary(), keyword()) :: boolean()

Check if a url matches a client redirect_uri

@spec validate(
  binary() | nil,
  keyword()
) :: {:ok, binary()} | {:error, binary()}

Validates if a url can be used as a redirect_uri.

Validates according to RFC 6749 3.1.2 and RFC 8252 7.1. The validation is skipped if the redirect uri is the same as the :native_redirect_uri configuration setting.