pub struct OidcProviderConfig {Show 18 fields
pub kind: ProviderKind,
pub issuer_url: Option<String>,
pub authorization_endpoint: Option<String>,
pub token_endpoint_url: Option<String>,
pub userinfo_endpoint: Option<String>,
pub pkce_supported: bool,
pub claim_mapping: ClaimMapping,
pub client_id: String,
pub client_secret: Option<String>,
pub scopes: Vec<String>,
pub display_name: Option<String>,
pub allow_http: bool,
pub user_mapping: UserMappingStrategy,
pub federate_atproto_owner: Option<FederateAtprotoOwnerEnrollment>,
pub provisioning: ProvisioningMode,
pub allowed_domains: Vec<String>,
pub default_scopes: Vec<String>,
pub clock_skew_seconds: u64,
}Expand description
Configuration for an external OIDC provider (login delegation).
Hyprstream acts as an OIDC Relying Party to this provider. Users authenticate with the provider; hyprstream validates the external id_token and issues its own JWT with scopes from the policy engine.
Fields§
§kind: ProviderKindProvider protocol kind. Default: "oidc".
issuer_url: Option<String>OIDC issuer URL. Required for kind = "oidc".
Must support /.well-known/openid-configuration.
Authorization endpoint URL. Required for kind = "oauth2".
token_endpoint_url: Option<String>Token endpoint URL. Required for kind = "oauth2". Named token_endpoint_url
to avoid collision with method names on OIDC metadata types.
userinfo_endpoint: Option<String>Userinfo endpoint URL. Required for kind = "oauth2".
pkce_supported: boolWhether the provider supports PKCE (code_challenge). Default: true.
Set to false for providers that reject the parameter (e.g. GitHub).
claim_mapping: ClaimMappingClaim field name overrides for mapping userinfo JSON to synthetic claims.
client_id: StringClient ID registered with the external provider.
client_secret: Option<String>Client secret (optional — omit for public client with PKCE).
scopes: Vec<String>Scopes to request from the provider.
display_name: Option<String>Display name for the login UI (e.g., “Sign in with GitHub”).
allow_http: boolAllow plain HTTP for discovery (dev only).
user_mapping: UserMappingStrategyUser identity mapping strategy.
federate_atproto_owner: Option<FederateAtprotoOwnerEnrollment>Explicit root-configured Federate owner enrollment for interactive
OIDC. When present, the signed Federate ATProto owner DID must match
owner_did, and an existing hosted account is linked atomically. When
username is set the link target is fixed by trusted configuration;
when omitted, the user must explicitly start a session-bound owner-link
flow after signing into an existing hosted account. This never
provisions an account.
provisioning: ProvisioningModeUser provisioning mode.
allowed_domains: Vec<String>Allowed email domains (when provisioning = allowlist).
default_scopes: Vec<String>Default hyprstream scopes for auto-provisioned users.
clock_skew_seconds: u64Clock skew tolerance for JWT validation (seconds). OIDC only.
Implementations§
Source§impl OidcProviderConfig
impl OidcProviderConfig
pub fn effective_token_endpoint_url(&self) -> Option<&str>
pub fn effective_userinfo_endpoint(&self) -> Option<&str>
pub fn effective_pkce_supported(&self) -> bool
pub fn effective_claim_mapping(&self) -> ClaimMapping
pub fn effective_scopes(&self) -> Vec<String>
Trait Implementations§
Source§impl Clone for OidcProviderConfig
impl Clone for OidcProviderConfig
Source§fn clone(&self) -> OidcProviderConfig
fn clone(&self) -> OidcProviderConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OidcProviderConfig
impl Debug for OidcProviderConfig
Source§impl<'de> Deserialize<'de> for OidcProviderConfig
impl<'de> Deserialize<'de> for OidcProviderConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for OidcProviderConfig
impl RefUnwindSafe for OidcProviderConfig
impl Send for OidcProviderConfig
impl Sync for OidcProviderConfig
impl Unpin for OidcProviderConfig
impl UnsafeUnpin for OidcProviderConfig
impl UnwindSafe for OidcProviderConfig
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request