Add authentication from upstream providers #107

Merged
pierre merged 25 commits from feat-upstream-providers into master 2023-04-27 10:10:29 +00:00
2 changed files with 5 additions and 0 deletions
Showing only changes of commit 1f3dfaa665 - Show all commits

View File

@ -10,6 +10,7 @@ use crate::actors::users_actor::{AuthorizedAuthenticationSources, UsersActor};
use crate::constants::TEMPORARY_PASSWORDS_LEN; use crate::constants::TEMPORARY_PASSWORDS_LEN;
use crate::controllers::settings_controller::BaseSettingsPage; use crate::controllers::settings_controller::BaseSettingsPage;
use crate::data::action_logger::{Action, ActionLogger}; use crate::data::action_logger::{Action, ActionLogger};
use crate::data::app_config::AppConfig;
use crate::data::client::{Client, ClientID, ClientManager}; use crate::data::client::{Client, ClientID, ClientManager};
use crate::data::current_user::CurrentUser; use crate::data::current_user::CurrentUser;
use crate::data::provider::{Provider, ProviderID, ProvidersManager}; use crate::data::provider::{Provider, ProviderID, ProvidersManager};
@ -28,6 +29,7 @@ struct ClientsListTemplate<'a> {
struct ProvidersListTemplate<'a> { struct ProvidersListTemplate<'a> {
_p: BaseSettingsPage<'a>, _p: BaseSettingsPage<'a>,
providers: Vec<Provider>, providers: Vec<Provider>,
redirect_url: String,
} }
#[derive(Template)] #[derive(Template)]
@ -68,6 +70,7 @@ pub async fn providers_route(
ProvidersListTemplate { ProvidersListTemplate {
_p: BaseSettingsPage::get("OpenID Providers list", &user, None, None), _p: BaseSettingsPage::get("OpenID Providers list", &user, None, None),
providers: providers.cloned(), providers: providers.cloned(),
redirect_url: AppConfig::get().oidc_provider_redirect_url(),
} }
.render() .render()
.unwrap(), .unwrap(),

View File

@ -34,4 +34,6 @@
</tbody> </tbody>
</table> </table>
<p>Redirect URL for new clients: {{ redirect_url }}</p>
{% endblock content %} {% endblock content %}