Rust

Users, teams, memberships, password hashes and project auth settings.

Contents

use utopia_migration::resources::auth::AuthMethods;
Rust
pub struct AuthMethods

The project's enabled auth methods.

Also implements Default.
use utopia_migration::resources::auth::Hash;
Rust
pub struct Hash

A password hash and the parameters of its algorithm.

use utopia_migration::resources::auth::Membership;
Rust
pub struct Membership

A user's membership of a team.

use utopia_migration::resources::auth::OAuth2Provider;
Rust
pub struct OAuth2Provider

An OAuth2 provider's configuration (never its secret).

use utopia_migration::resources::auth::Policies;
Rust
pub struct Policies

The project's auth policies.

Also implements Default.
use utopia_migration::resources::auth::ProviderField;
Rust
pub struct ProviderField

How one OAuth2 provider setting maps onto the destination: into the app id, or into the JSON secret under key (the setting's own name when None).

use utopia_migration::resources::auth::Team;
Rust
pub struct Team

A team.

use utopia_migration::resources::auth::User;
Rust
pub struct User

A user.

Also implements Default.
use utopia_migration::resources::auth::oauth2_descriptor;
Rust
pub fn oauth2_descriptor(provider: &str) -> Option<&'static [ProviderField]>

The settings descriptor of a provider.

Rust
pub const OAUTH2_PROVIDERS: &[(&str, &[ProviderField])] = &[ ("amazon", CLIENT), ("apple", &[app("serviceId"), secret("keyId", Some("keyID")), secret("teamId", Some("teamID"))]), ("appwrite", CLIENT), ("auth0", &[app("clientId"), secret("endpoint", None)]), ("authentik", &[app("clientId"), secret("endpoint", None)]), ("autodesk", CLIENT), ("bitbucket", CLIENT), ("bitly", CLIENT), ("box", CLIENT), ("cloudflare", CLIENT), ("dailymotion", CLIENT), ("discord", CLIENT), ("disqus", CLIENT), ("dropbox", CLIENT), ("etsy", CLIENT), ("facebook", CLIENT), ("figma", CLIENT), ("fusionauth", &[app("clientId"), secret("endpoint", None)]), ("github", CLIENT), ("gitlab", &[app("clientId"), secret("endpoint", None)]), ("google", &[app("clientId"), secret("prompt", None)]), ("huggingface", CLIENT), ("kakao", CLIENT), ("keycloak", &[app("clientId"), secret("endpoint", Some("keycloakDomain")), secret("realmName", Some("keycloakRealm"))]), ("kick", CLIENT), ("linkedin", CLIENT),

The OAuth2 providers a migration carries, and the settings each copies.