AuthorizationRule AuthorizationRule Class

Defines the Azure Service Bus authorization rule that is used to determine whether an operation is permissible or not.

Syntax

Declaration

[DataContract(Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
[KnownType(typeof (AllowRule))]
[KnownType(typeof (SharedAccessAuthorizationRule))]
public abstract class AuthorizationRule<DataContract(Namespace:="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")>
<KnownType(GetType(AllowRule))>
<KnownType(GetType(SharedAccessAuthorizationRule))>
Public MustInherit Class AuthorizationRule

Inheritance Hierarchy

Fields summary

The name identifier claim rule.

The role role claim rule.

The role role claim rule.

The shared access key claim rule.

The short name identifier claim rule.

The short UPN claim rule.

The UPN claim rule.

Properties summary

Gets or sets the claim type.

Gets or sets the claim value which is either ‘Send’, ‘Listen’, or ‘Manage’.

Gets or sets the date and time when the authorization rule was created.

Gets or sets the name identifier of the issuer.

Gets or sets the authorization rule key name.

Gets or sets the date and time when the authorization rule was modified.

Gets or sets the modification revision number.

Gets or sets the list of rights.

Methods summary

Creates a copy of AuthorizationRule.

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

Returns the hash code for this instance.

Enables derived classes to provide custom handling when validating the authorization rule.

Checks the validity of the specified access rights.

Fields

  • NameIdentifierClaimType
    NameIdentifierClaimType

    The name identifier claim rule.

    public const string NameIdentifierClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"Public Const NameIdentifierClaimType As String = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
  • RoleClaimType
    RoleClaimType

    The role role claim rule.

    public const string RoleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"Public Const RoleClaimType As String = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"
  • RoleRoleClaimType
    RoleRoleClaimType

    The role role claim rule.

    public const string RoleRoleClaimType = "role"Public Const RoleRoleClaimType As String = "role"
  • SharedAccessKeyClaimType
    SharedAccessKeyClaimType

    The shared access key claim rule.

    public const string SharedAccessKeyClaimType = "sharedaccesskey"Public Const SharedAccessKeyClaimType As String = "sharedaccesskey"
  • ShortNameIdentifierClaimType
    ShortNameIdentifierClaimType

    The short name identifier claim rule.

    public const string ShortNameIdentifierClaimType = "nameidentifier"Public Const ShortNameIdentifierClaimType As String = "nameidentifier"
  • ShortUpnClaimType
    ShortUpnClaimType

    The short UPN claim rule.

    public const string ShortUpnClaimType = "upn"Public Const ShortUpnClaimType As String = "upn"
  • UpnClaimType
    UpnClaimType

    The UPN claim rule.

    public const string UpnClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"Public Const UpnClaimType As String = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"

Properties

  • ClaimType
    ClaimType

    Gets or sets the claim type.

    public string ClaimType { get; set; }Public Property ClaimType As String

    Property Value

  • ClaimValue
    ClaimValue

    Gets or sets the claim value which is either ‘Send’, ‘Listen’, or ‘Manage’.

    public string ClaimValue { get; set; }Public Property ClaimValue As String

    Property Value

    • The claim value which is either ‘Send’, ‘Listen’, or ‘Manage’.

  • CreatedTime
    CreatedTime

    Gets or sets the date and time when the authorization rule was created.

    [DataMember(IsRequired = false, Order = 1006, EmitDefaultValue = false)]
    public DateTime CreatedTime { get; }<DataMember(IsRequired:=False, Order:=1006, EmitDefaultValue:=False)>
    Public ReadOnly Property CreatedTime As Date

    Property Value

  • IssuerName
    IssuerName

    Gets or sets the name identifier of the issuer.

    public string IssuerName { get; set; }Public Property IssuerName As String

    Property Value

  • KeyName
    KeyName

    Gets or sets the authorization rule key name.

    public abstract string KeyName { get; set; }Public MustOverride Property KeyName As String

    Property Value

  • ModifiedTime
    ModifiedTime

    Gets or sets the date and time when the authorization rule was modified.

    [DataMember(IsRequired = false, Order = 1007, EmitDefaultValue = false)]
    public DateTime ModifiedTime { get; }<DataMember(IsRequired:=False, Order:=1007, EmitDefaultValue:=False)>
    Public ReadOnly Property ModifiedTime As Date

    Property Value

  • Revision
    Revision

    Gets or sets the modification revision number.

    [DataMember(IsRequired = false, Order = 1008, EmitDefaultValue = false)]
    public long Revision { get; set; }<DataMember(IsRequired:=False, Order:=1008, EmitDefaultValue:=False)>
    Public Property Revision As Long

    Property Value

  • Rights
    Rights

    Gets or sets the list of rights.

    public IEnumerable<AccessRights> Rights { get; set; }Public Property Rights As IEnumerable(Of AccessRights)

    Property Value

Methods

  • Clone()
    Clone()

    Creates a copy of AuthorizationRule.

    public virtual AuthorizationRule Clone()Public Overridable Function Clone As AuthorizationRule

    Returns

  • Equals(Object)
    Equals(Object)

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

    public override bool Equals(object obj)Public Overrides Function Equals(obj As Object) As Boolean

    Parameters

    • obj

      The object to compare with the current object.

    Returns

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

    Overrides

  • GetHashCode()
    GetHashCode()

    Returns the hash code for this instance.

    public override int GetHashCode()Public Overrides Function GetHashCode As Integer

    Returns

    Overrides

  • OnValidate()
    OnValidate()

    Enables derived classes to provide custom handling when validating the authorization rule.

    protected virtual void OnValidate()Protected Overridable Sub OnValidate
  • ValidateRights(IEnumerable<AccessRights>)
    ValidateRights(IEnumerable(Of AccessRights))

    Checks the validity of the specified access rights.

    protected virtual void ValidateRights(IEnumerable<AccessRights> value)Protected Overridable Sub ValidateRights(value As IEnumerable(Of AccessRights))

    Parameters

Attributes

System.Runtime.Serialization.DataContractAttribute
System.Runtime.Serialization.KnownTypeAttribute
System.Runtime.Serialization.KnownTypeAttribute

Details

Namespace

Microsoft.ServiceBus.Messaging

Assembly

Microsoft.ServiceBus.dll