File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
2323### Added
2424
25+ - [ core] Add ` get_token_with_client_id() ` to get a token for a specific client ID
2526- [ core] Add ` login ` (mobile) and ` auth_token ` retrieval via login5
2627- [ core] Add ` OS ` and ` os_version ` to ` config.rs `
2728- [ discovery] Added a new MDNS/DNS-SD backend which connects to Avahi via D-Bus.
Original file line number Diff line number Diff line change @@ -58,9 +58,20 @@ impl TokenProvider {
5858 } )
5959 }
6060
61+ // Not all combinations of scopes and client ID are allowed.
62+ // Depending on the client ID currently used, the function may return an error for specific scopes.
63+ // In this case get_token_with_client_id() can be used, where an appropriate client ID can be provided.
6164 // scopes must be comma-separated
6265 pub async fn get_token ( & self , scopes : & str ) -> Result < Token , Error > {
6366 let client_id = self . session ( ) . client_id ( ) ;
67+ self . get_token_with_client_id ( scopes, & client_id) . await
68+ }
69+
70+ pub async fn get_token_with_client_id (
71+ & self ,
72+ scopes : & str ,
73+ client_id : & str ,
74+ ) -> Result < Token , Error > {
6475 if client_id. is_empty ( ) {
6576 return Err ( Error :: invalid_argument ( "Client ID cannot be empty" ) ) ;
6677 }
You can’t perform that action at this time.
0 commit comments