Change Box<ClientSecret> types to OwnedClientSecret
This commit is contained in:
parent
2a4b3f5668
commit
d9f08f585c
@ -4,6 +4,8 @@ Breaking changes:
|
|||||||
|
|
||||||
- `RoomSummary::heroes` now properly contains only `UserId` instead of `String`
|
- `RoomSummary::heroes` now properly contains only `UserId` instead of `String`
|
||||||
as before.
|
as before.
|
||||||
|
- Change type of `client_secret` field in `ThirdpartyIdCredentials`
|
||||||
|
from `Box<ClientSecret>` to `OwnedClientSecret`
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ use ruma_common::{
|
|||||||
api::{error::IntoHttpError, EndpointError, OutgoingResponse},
|
api::{error::IntoHttpError, EndpointError, OutgoingResponse},
|
||||||
serde::{from_raw_json_value, JsonObject, StringEnum},
|
serde::{from_raw_json_value, JsonObject, StringEnum},
|
||||||
thirdparty::Medium,
|
thirdparty::Medium,
|
||||||
ClientSecret, OwnedSessionId, OwnedUserId,
|
OwnedClientSecret, OwnedSessionId, OwnedUserId,
|
||||||
};
|
};
|
||||||
use serde::{
|
use serde::{
|
||||||
de::{self, DeserializeOwned},
|
de::{self, DeserializeOwned},
|
||||||
@ -546,7 +546,7 @@ pub struct ThirdpartyIdCredentials {
|
|||||||
pub sid: OwnedSessionId,
|
pub sid: OwnedSessionId,
|
||||||
|
|
||||||
/// Identity server client secret.
|
/// Identity server client secret.
|
||||||
pub client_secret: Box<ClientSecret>,
|
pub client_secret: OwnedClientSecret,
|
||||||
|
|
||||||
/// Identity server URL.
|
/// Identity server URL.
|
||||||
pub id_server: String,
|
pub id_server: String,
|
||||||
@ -560,7 +560,7 @@ impl ThirdpartyIdCredentials {
|
|||||||
/// server address and access token.
|
/// server address and access token.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
sid: OwnedSessionId,
|
sid: OwnedSessionId,
|
||||||
client_secret: Box<ClientSecret>,
|
client_secret: OwnedClientSecret,
|
||||||
id_server: String,
|
id_server: String,
|
||||||
id_access_token: String,
|
id_access_token: String,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
Breaking changes:
|
||||||
|
|
||||||
|
- Change type of `client_secret` field in `ThreePidOwnershipProof`
|
||||||
|
from `Box<ClientSecret>` to `OwnedClientSecret`
|
||||||
|
|
||||||
# 0.9.0
|
# 0.9.0
|
||||||
|
|
||||||
Breaking changes:
|
Breaking changes:
|
||||||
|
@ -11,7 +11,7 @@ pub mod v2 {
|
|||||||
api::{request, response, Metadata},
|
api::{request, response, Metadata},
|
||||||
metadata,
|
metadata,
|
||||||
thirdparty::Medium,
|
thirdparty::Medium,
|
||||||
ClientSecret, OwnedSessionId, OwnedUserId,
|
OwnedClientSecret, OwnedSessionId, OwnedUserId,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -96,12 +96,12 @@ pub mod v2 {
|
|||||||
pub sid: OwnedSessionId,
|
pub sid: OwnedSessionId,
|
||||||
|
|
||||||
/// The client secret passed to the `requestToken` call.
|
/// The client secret passed to the `requestToken` call.
|
||||||
pub client_secret: Box<ClientSecret>,
|
pub client_secret: OwnedClientSecret,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ThreePidOwnershipProof {
|
impl ThreePidOwnershipProof {
|
||||||
/// Creates a new `ThreePidOwnershipProof` with the given session ID and client secret.
|
/// Creates a new `ThreePidOwnershipProof` with the given session ID and client secret.
|
||||||
pub fn new(sid: OwnedSessionId, client_secret: Box<ClientSecret>) -> Self {
|
pub fn new(sid: OwnedSessionId, client_secret: OwnedClientSecret) -> Self {
|
||||||
Self { sid, client_secret }
|
Self { sid, client_secret }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user