pub struct KanidmScopeMap {
pub group: String,
pub scopes: Vec<String>,
}Expand description
The KanidmScopeMap struct represents a mapping of a group to a set of OAuth2 scopes in Kanidm.
Scope maps in Kanidm are used to define the permissions that a client application can request on behalf of a user. These scopes determine what resources the client can access and what operations it can perform.
These provide a set of scopes if a user is a member of a specific group within Kanidm. This allows you to create a relationship between the scopes of a service, and the groups/roles in Kanidm which can be specific to that service.
Fields§
§group: StringGroup name or SPN. Members of this group will be granted the scopes defined in the scopes field.
scopes: Vec<String>A scope is a string that represents a specific permission or set of permissions that a client application can request from an authorization server. Scopes define the level of access that the client application is granted to the user’s resources.
OpenID Connect allows a number of scopes that affect the content of the resulting authorization token. If one of the following scopes is requested by the OpenID client, then the associated claims may be added to the authorization token. It is not guaranteed that all of the associated claims will be added.
profile: name, family_name, given_name, middle_name, nickname, preferred_username, profile, picture, website, gender, birthdate, zoneinfo, locale, and updated_atemail: email, email_verifiedaddress: addressphone: phone_number, phone_number_verifiedgroups: groups
If you are creating an OpenID Connect (OIDC) client, you MUST provide a scope map containing openid.
Without this, OpenID Connect clients WILL NOT WORK!
Implementations§
Trait Implementations§
Source§impl Clone for KanidmScopeMap
impl Clone for KanidmScopeMap
Source§fn clone(&self) -> KanidmScopeMap
fn clone(&self) -> KanidmScopeMap
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 KanidmScopeMap
impl Debug for KanidmScopeMap
Source§impl Default for KanidmScopeMap
impl Default for KanidmScopeMap
Source§fn default() -> KanidmScopeMap
fn default() -> KanidmScopeMap
Source§impl<'de> Deserialize<'de> for KanidmScopeMap
impl<'de> Deserialize<'de> for KanidmScopeMap
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>,
Source§impl JsonSchema for KanidmScopeMap
impl JsonSchema for KanidmScopeMap
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for KanidmScopeMap
impl Ord for KanidmScopeMap
Source§fn cmp(&self, other: &KanidmScopeMap) -> Ordering
fn cmp(&self, other: &KanidmScopeMap) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for KanidmScopeMap
impl PartialEq for KanidmScopeMap
Source§fn eq(&self, other: &KanidmScopeMap) -> bool
fn eq(&self, other: &KanidmScopeMap) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for KanidmScopeMap
impl PartialOrd for KanidmScopeMap
Source§impl Serialize for KanidmScopeMap
impl Serialize for KanidmScopeMap
impl Eq for KanidmScopeMap
impl StructuralPartialEq for KanidmScopeMap
Auto Trait Implementations§
impl Freeze for KanidmScopeMap
impl RefUnwindSafe for KanidmScopeMap
impl Send for KanidmScopeMap
impl Sync for KanidmScopeMap
impl Unpin for KanidmScopeMap
impl UnsafeUnpin for KanidmScopeMap
impl UnwindSafe for KanidmScopeMap
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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