You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Add a constructor for a basic AuthorizationRequest
This commit is contained in:
committed by
Quentin Gliech
parent
7a931925fa
commit
bffbf63992
@ -143,6 +143,36 @@ pub struct AuthorizationRequest {
|
|||||||
pub registration: Option<String>,
|
pub registration: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AuthorizationRequest {
|
||||||
|
/// Creates a basic `AuthorizationRequest`.
|
||||||
|
#[must_use]
|
||||||
|
pub fn new(
|
||||||
|
response_type: OAuthAuthorizationEndpointResponseType,
|
||||||
|
client_id: String,
|
||||||
|
scope: Scope,
|
||||||
|
) -> Self {
|
||||||
|
Self {
|
||||||
|
response_type,
|
||||||
|
client_id,
|
||||||
|
redirect_uri: None,
|
||||||
|
scope,
|
||||||
|
state: None,
|
||||||
|
response_mode: None,
|
||||||
|
nonce: None,
|
||||||
|
display: None,
|
||||||
|
prompt: None,
|
||||||
|
max_age: None,
|
||||||
|
ui_locales: None,
|
||||||
|
id_token_hint: None,
|
||||||
|
login_hint: None,
|
||||||
|
acr_values: None,
|
||||||
|
request: None,
|
||||||
|
request_uri: None,
|
||||||
|
registration: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[skip_serializing_none]
|
#[skip_serializing_none]
|
||||||
#[derive(Serialize, Deserialize, Default, Debug, Clone)]
|
#[derive(Serialize, Deserialize, Default, Debug, Clone)]
|
||||||
pub struct AuthorizationResponse<R> {
|
pub struct AuthorizationResponse<R> {
|
||||||
|
Reference in New Issue
Block a user