Skip to content
Snippets Groups Projects
Verified Commit 47fce256 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[OAuth] Finish commenting for now

parent a0494398
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,7 @@ fn get_client<E: Copy>(conf: &Config, prefix: &str, error_value: E) -> Result<Ba ...@@ -89,6 +89,7 @@ fn get_client<E: Copy>(conf: &Config, prefix: &str, error_value: E) -> Result<Ba
return Ok(client); return Ok(client);
} }
// FIXME Merge with get_access_token_password if https://github.com/ramosbugs/oauth2-rs/issues/142 is accepted
pub fn get_access_token_client<E: Copy>(conf: &Config, prefix: &str, error_value: E, unauth_value: E) -> Result<BasicTokenResponse, E> { pub fn get_access_token_client<E: Copy>(conf: &Config, prefix: &str, error_value: E, unauth_value: E) -> Result<BasicTokenResponse, E> {
let scopes: Vec<String> = match get_optional(&conf, &full_key(vec![prefix, "scopes"])) { let scopes: Vec<String> = match get_optional(&conf, &full_key(vec![prefix, "scopes"])) {
Some(v) => v, Some(v) => v,
...@@ -117,6 +118,7 @@ pub fn get_access_token_client<E: Copy>(conf: &Config, prefix: &str, error_value ...@@ -117,6 +118,7 @@ pub fn get_access_token_client<E: Copy>(conf: &Config, prefix: &str, error_value
} }
} }
// FIXME Merge with get_access_token_client if https://github.com/ramosbugs/oauth2-rs/issues/142 is accepted
pub fn get_access_token_password<E: Copy>(conf: &Config, prefix: &str, username: String, password: String, error_value: E, unauth_value: E) -> Result<BasicTokenResponse, E> { pub fn get_access_token_password<E: Copy>(conf: &Config, prefix: &str, username: String, password: String, error_value: E, unauth_value: E) -> Result<BasicTokenResponse, E> {
let scopes: Vec<String> = match get_optional(&conf, &full_key(vec![prefix, "scopes"])) { let scopes: Vec<String> = match get_optional(&conf, &full_key(vec![prefix, "scopes"])) {
Some(v) => v, Some(v) => v,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment