mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
resolver: Himmelblau needs old token for refresh (#1962)
Himmelblau needs access to the old token during a refresh otherwise the GECOS is lost (AAD responds with everything we need except GECOS). Signed-off-by: David Mulder <dmulder@samba.org>
This commit is contained in:
parent
f472c48518
commit
498be4f08a
|
@ -55,7 +55,7 @@ pub struct UserToken {
|
|||
pub trait IdProvider {
|
||||
async fn provider_authenticate(&self) -> Result<(), IdpError>;
|
||||
|
||||
async fn unix_user_get(&self, id: &Id) -> Result<UserToken, IdpError>;
|
||||
async fn unix_user_get(&self, id: &Id, old_token: Option<UserToken>) -> Result<UserToken, IdpError>;
|
||||
|
||||
async fn unix_user_authenticate(
|
||||
&self,
|
||||
|
|
|
@ -79,7 +79,7 @@ impl IdProvider for KanidmProvider {
|
|||
}
|
||||
}
|
||||
|
||||
async fn unix_user_get(&self, id: &Id) -> Result<UserToken, IdpError> {
|
||||
async fn unix_user_get(&self, id: &Id, _old_token: Option<UserToken>) -> Result<UserToken, IdpError> {
|
||||
match self
|
||||
.client
|
||||
.read()
|
||||
|
|
|
@ -393,7 +393,7 @@ where
|
|||
account_id: &Id,
|
||||
token: Option<UserToken>,
|
||||
) -> Result<Option<UserToken>, ()> {
|
||||
match self.client.unix_user_get(account_id).await {
|
||||
match self.client.unix_user_get(account_id, token.clone()).await {
|
||||
Ok(mut n_tok) => {
|
||||
if self.check_nxset(&n_tok.name, n_tok.gidnumber).await {
|
||||
// Refuse to release the token, it's in the denied set.
|
||||
|
|
Loading…
Reference in a new issue