Add structs for User-Interactive Authentication API.
This commit is contained in:
		
							parent
							
								
									ff8427cb93
								
							
						
					
					
						commit
						9198a549e7
					
				| @ -9,6 +9,10 @@ Breaking changes: | ||||
|   * Remove deprecated `home_server` response field (removed in r0.4.0) | ||||
| * Add `auth_parameters` to `r0::account::AuthenticationData`  | ||||
| 
 | ||||
| Improvements: | ||||
| 
 | ||||
| * Add types for User-Interactive Authentication API: `r0::account::{UserInteractiveAuthenticationInfo, AuthenticationFlow}` | ||||
| 
 | ||||
| # 0.7.2 | ||||
| 
 | ||||
| Bug fixes: | ||||
|  | ||||
| @ -34,6 +34,31 @@ pub struct AuthenticationData { | ||||
|     pub auth_parameters: BTreeMap<String, serde_json::Value>, | ||||
| } | ||||
| 
 | ||||
| /// Information about available authentication flows and status for
 | ||||
| /// User-Interactive Authenticiation API.
 | ||||
| #[derive(Clone, Debug, Deserialize, Serialize)] | ||||
| pub struct UserInteractiveAuthenticationInfo { | ||||
|     /// List of authentication flows available for this endpoint.
 | ||||
|     pub flows: Vec<AuthenticationFlow>, | ||||
|     /// List of stages in the current flow completed by the client.
 | ||||
|     #[serde(default, skip_serializing_if = "Vec::is_empty")] | ||||
|     pub completed: Vec<String>, | ||||
|     /// Authentication parameters required for the client to complete authentication.
 | ||||
|     pub params: serde_json::Value, | ||||
|     /// Session key for client to use to complete authentication.
 | ||||
|     #[serde(skip_serializing_if = "Option::is_none")] | ||||
|     pub session: Option<String>, | ||||
| } | ||||
| 
 | ||||
| /// Description of steps required to authenticate via the User-Interactive
 | ||||
| /// Authentication API.
 | ||||
| #[derive(Clone, Debug, Deserialize, Serialize)] | ||||
| pub struct AuthenticationFlow { | ||||
|     /// Ordered list of stages required to complete authentication.
 | ||||
|     #[serde(default, skip_serializing_if = "Vec::is_empty")] | ||||
|     pub stages: Vec<String>, | ||||
| } | ||||
| 
 | ||||
| /// Additional authentication information for requestToken endpoints.
 | ||||
| #[derive(Clone, Debug, Deserialize, Serialize)] | ||||
| pub struct IdentityServerInfo { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user