Table of Contents

Class ConnectionScopeOAuth2

Namespace
Auth0.ManagementApi
Assembly
Auth0.ManagementApi.dll

OAuth 2.0 scopes requested from the identity provider during authorization. Determines what user information and permissions Auth0 can access. Can be specified as a space-delimited string (e.g., 'openid profile email') or array of scope values. The 'useOauthSpecScope' setting controls delimiter behavior when using connection_scope parameter.

[JsonConverter(typeof(ConnectionScopeOAuth2.JsonConverter))]
[Serializable]
public class ConnectionScopeOAuth2
Inheritance
ConnectionScopeOAuth2
Inherited Members
Extension Methods

Properties

Type

Type discriminator

[JsonIgnore]
public string Type { get; }

Property Value

string

Value

Union value

[JsonIgnore]
public object? Value { get; }

Property Value

object

Methods

AsListOfString()

public IEnumerable<string> AsListOfString()

Returns

IEnumerable<string>

AsString()

Returns the value as a string if Type is 'string', otherwise throws an exception.

public string AsString()

Returns

string

Exceptions

ManagementException

Thrown when Type is not 'string'.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

FromListOfString(IEnumerable<string>)

public static ConnectionScopeOAuth2 FromListOfString(IEnumerable<string> value)

Parameters

value IEnumerable<string>

Returns

ConnectionScopeOAuth2

FromString(string)

Factory method to create a union from a string value.

public static ConnectionScopeOAuth2 FromString(string value)

Parameters

value string

Returns

ConnectionScopeOAuth2

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsListOfString()

Returns true if Type is "list"

public bool IsListOfString()

Returns

bool

IsString()

Returns true if Type is "string"

public bool IsString()

Returns

bool

Match<T>(Func<string, T>, Func<IEnumerable<string>, T>)

public T Match<T>(Func<string, T> onString, Func<IEnumerable<string>, T> onListOfString)

Parameters

onString Func<string, T>
onListOfString Func<IEnumerable<string>, T>

Returns

T

Type Parameters

T

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryGetListOfString(out IEnumerable<string>?)

public bool TryGetListOfString(out IEnumerable<string>? value)

Parameters

value IEnumerable<string>

Returns

bool

TryGetString(out string?)

Attempts to cast the value to a string and returns true if successful.

public bool TryGetString(out string? value)

Parameters

value string

Returns

bool

Visit(Action<string>, Action<IEnumerable<string>>)

public void Visit(Action<string> onString, Action<IEnumerable<string>> onListOfString)

Parameters

onString Action<string>
onListOfString Action<IEnumerable<string>>

Operators

implicit operator ConnectionScopeOAuth2(string)

public static implicit operator ConnectionScopeOAuth2(string value)

Parameters

value string

Returns

ConnectionScopeOAuth2