setup

Function setup 

Source
pub async fn setup(
    rocket: Rocket<Build>,
    config: OIDCConfig,
) -> Result<Rocket<Build>, Box<dyn Error>>
Expand description

Initializes the Rocket application with OpenID Connect authentication support.

This function:

  • Loads OIDC configuration from the given config.
  • Calls from_provider_oidc_config to build the authentication state.
  • Registers authentication-related routes under the /auth path.
  • Attaches the authentication state as managed state in Rocket.

Returns the updated Rocket instance, or an error if the setup failed.