Boruta core v1.0.0-rc.2 Boruta.Oauth.Authorization.Scope View Source
Scope authorization
Link to this section Summary
Functions
Authorize the given scope according to the given client.
Link to this section Functions
Specs
authorize( params :: [ scope: String.t(), against: %{ optional(:client) => %Boruta.Oauth.Client{ authorize_scope: term(), authorized_scopes: term(), id: term(), redirect_uris: term(), secret: term(), supported_grant_types: term() }, optional(:resource_owner) => struct(), optional(:token) => %Boruta.Oauth.Token{ client: term(), expires_at: term(), id: term(), inserted_at: term(), redirect_uri: term(), refresh_token: term(), resource_owner: term(), revoked_at: term(), scope: term(), state: term(), type: term(), value: term() } } ] ) :: {:ok, scope :: String.t()} | {:error, Boruta.Oauth.Error.t()}
Authorize the given scope according to the given client.
Examples
iex> authorize(%{scope: "scope", client: %Client{...}})
{:ok, "scope"}