#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.ScopeManagement](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ScopeManagement 'Abblix\.Oidc\.Server\.Features\.ScopeManagement')

## ScopeManager Class

In\-memory [IScopeManager](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager 'Abblix\.Oidc\.Server\.Features\.ScopeManagement\.IScopeManager') that seeds the registry with the six OIDC Core §5\.4
standard scopes \(`openid`, `profile`, `email`, `address`, `phone`,
`offline_access`\) and merges any host\-defined scopes from
[Scopes](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.Scopes 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.Scopes')\. Lookups are case\-sensitive \(RFC 6749 §3\.3 treats scope
values as case\-sensitive strings\) and host\-defined scopes do not override the standard ones\.

```csharp
public class ScopeManager : Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager, System.Collections.Generic.IEnumerable<Abblix.Oidc.Server.Common.Constants.ScopeDefinition>, System.Collections.IEnumerable
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → ScopeManager

Implements [IScopeManager](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager 'Abblix\.Oidc\.Server\.Features\.ScopeManagement\.IScopeManager'), [System\.Collections\.Generic\.IEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1')[ScopeDefinition](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System\.Collections\.Generic\.IEnumerable\`1'), [System\.Collections\.IEnumerable](https://learn.microsoft.com/en-us/dotnet/api/system.collections.ienumerable 'System\.Collections\.IEnumerable')
### Constructors

## ScopeManager\(IOptions\<OidcOptions\>\) Constructor {#Abblix.Oidc.Server.Features.ScopeManagement.ScopeManager.ScopeManager(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_)}

In\-memory [IScopeManager](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager 'Abblix\.Oidc\.Server\.Features\.ScopeManagement\.IScopeManager') that seeds the registry with the six OIDC Core §5\.4
standard scopes \(`openid`, `profile`, `email`, `address`, `phone`,
`offline_access`\) and merges any host\-defined scopes from
[Scopes](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.Scopes 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.Scopes')\. Lookups are case\-sensitive \(RFC 6749 §3\.3 treats scope
values as case\-sensitive strings\) and host\-defined scopes do not override the standard ones\.

```csharp
public ScopeManager(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);
```
#### Parameters

###### `options` [Microsoft\.Extensions\.Options\.IOptions&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1')[OidcOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1') {#Abblix.Oidc.Server.Features.ScopeManagement.ScopeManager.ScopeManager(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}

The options containing OIDC configuration, including additional custom scopes\.
### Methods

## ScopeManager\.GetEnumerator\(\) Method {#Abblix.Oidc.Server.Features.ScopeManagement.ScopeManager.GetEnumerator()}

Iterates over all registered scope definitions in unspecified order\.

```csharp
public System.Collections.Generic.IEnumerator<Abblix.Oidc.Server.Common.Constants.ScopeDefinition> GetEnumerator();
```

Implements [GetEnumerator\(\)](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1.getenumerator 'System\.Collections\.Generic\.IEnumerable\`1\.GetEnumerator'), [GetEnumerator\(\)](https://learn.microsoft.com/en-us/dotnet/api/system.collections.ienumerable.getenumerator 'System\.Collections\.IEnumerable\.GetEnumerator')

#### Returns
[System\.Collections\.Generic\.IEnumerator&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerator-1 'System\.Collections\.Generic\.IEnumerator\`1')[ScopeDefinition](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerator-1 'System\.Collections\.Generic\.IEnumerator\`1')

## ScopeManager\.TryGet\(string, ScopeDefinition\) Method {#Abblix.Oidc.Server.Features.ScopeManagement.ScopeManager.TryGet(string,Abblix.Oidc.Server.Common.Constants.ScopeDefinition)}

Attempts to retrieve the definition of a specified scope\.

```csharp
public bool TryGet(string scope, out Abblix.Oidc.Server.Common.Constants.ScopeDefinition definition);
```
#### Parameters

###### `scope` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.ScopeManagement.ScopeManager.TryGet(string,Abblix.Oidc.Server.Common.Constants.ScopeDefinition).scope}

The scope identifier to retrieve the definition for\.

###### `definition` [ScopeDefinition](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition') {#Abblix.Oidc.Server.Features.ScopeManagement.ScopeManager.TryGet(string,Abblix.Oidc.Server.Common.Constants.ScopeDefinition).definition}

Outputs the [ScopeDefinition](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ScopeDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition') if the scope exists, otherwise null\.

Implements [TryGet\(string, ScopeDefinition\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager#Abblix.Oidc.Server.Features.ScopeManagement.IScopeManager.TryGet(string,Abblix.Oidc.Server.Common.Constants.ScopeDefinition) 'Abblix\.Oidc\.Server\.Features\.ScopeManagement\.IScopeManager\.TryGet\(string, Abblix\.Oidc\.Server\.Common\.Constants\.ScopeDefinition\)')

#### Returns
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')  
True if the scope exists and the definition is retrieved, false otherwise\.
