-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preauthorized code flow - token request
- Loading branch information
Showing
10 changed files
with
1,498 additions
and
1,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
lib/boruta/oauth/requests/preauthorization_code_request.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
defmodule Boruta.Oauth.PreauthorizationCodeRequest do | ||
@moduledoc """ | ||
Preauthorization code request | ||
""" | ||
|
||
@typedoc """ | ||
Type representing an authorization code request following the pre-authorized code flow as stated in [OpenID for Verifiable Credential Issuance - draft 12](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html). | ||
""" | ||
@type t :: %__MODULE__{ | ||
client_id: String.t(), | ||
client_authentication: %{ | ||
type: String.t(), | ||
value: String.t() | ||
}, | ||
redirect_uri: String.t(), | ||
preauthorized_code: String.t(), | ||
grant_type: String.t(), | ||
code_verifier: String.t() | ||
} | ||
@enforce_keys [:client_id, :redirect_uri, :preauthorized_code] | ||
defstruct client_id: nil, | ||
client_authentication: nil, | ||
redirect_uri: nil, | ||
preauthorized_code: nil, | ||
grant_type: "authorization_code", | ||
code_verifier: "" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.