spotless/oauth_2_1/authorization
Types
pub type Code {
InvalidRequest
UnauthorizedClient
AccessDenied
UnsupportedResponseType
InvalidScope
ServerError
TemporarilyUnavailable
}
Constructors
-
InvalidRequest
-
UnauthorizedClient
-
AccessDenied
-
UnsupportedResponseType
-
InvalidScope
-
ServerError
-
TemporarilyUnavailable
pub type CodeChallengeMethod {
Plain
S256
}
Constructors
-
Plain
-
S256
pub type Fail {
Fail(
code: Code,
description: String,
uri: String,
state: String,
)
}
Constructors
-
Fail(code: Code, description: String, uri: String, state: String)
pub type Request {
Request(
client_id: String,
code_challenge: String,
code_challenge_method: CodeChallengeMethod,
redirect_uri: String,
scope: List(String),
state: String,
)
}
Constructors
-
Request( client_id: String, code_challenge: String, code_challenge_method: CodeChallengeMethod, redirect_uri: String, scope: List(String), state: String, )
Values
pub fn error_code_from_string(
raw: String,
) -> Result(Code, String)
pub fn error_code_to_string(code: Code) -> String
pub fn request_from_http(
request: Request(a),
) -> Result(
spotless/oauth_2_1/authorization.Request,
#(Code, String),
)
pub fn request_from_params(
params: List(#(String, String)),
) -> Result(Request, #(Code, String))
pub fn request_to_http(
endpoint: #(Origin, String),
request: Request,
) -> gleam/http/request.Request(BitArray)
pub fn request_to_params(
request: Request,
) -> List(#(String, String))
pub fn request_to_url(
endpoint: #(Origin, String),
request: Request,
) -> String
pub fn response_from_http(
request: Request(a),
) -> Result(Response, #(Code, String))
pub fn response_from_params(
params: List(#(String, String)),
) -> Result(Response, #(Code, String))
pub fn response_from_uri(
uri: Uri,
) -> Result(Response, #(Code, String))
pub fn response_to_params(
response: Response,
) -> List(#(String, String))
pub fn response_to_url(
endpoint: #(Origin, String),
response: Response,
) -> String