forked from casdoor/casdoor-rust-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
92 additions
and
29 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
use jwt_claims::RegisteredClaims; | ||
pub use oauth2::TokenResponse; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::User; | ||
|
||
#[cfg_attr(feature = "salvo", derive(salvo::prelude::ToSchema))] | ||
#[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)] | ||
#[derive(Debug, Clone, Serialize, Deserialize, Default)] | ||
#[serde(rename_all = "camelCase", default)] | ||
pub struct Claims { | ||
#[serde(flatten)] | ||
pub user: User, | ||
pub access_token: String, | ||
pub token_type: String, | ||
pub refresh_token_type: String, | ||
pub tag: String, | ||
pub token_type: Option<String>, | ||
pub nonce: Option<String>, | ||
pub scope: Option<String>, | ||
#[serde(flatten)] | ||
pub reg_claims: RegisteredClaims, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ impl Service { | |
} | ||
} | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct UserService { | ||
service: Service, | ||
} | ||
|