Class AuthorizationRule
- Namespace
- Microsoft.ServiceBus.Messaging
- Assembly
- Microsoft.ServiceBus.dll
Defines the Azure Service Bus authorization rule that is used to determine whether an operation is permissible or not.
[DataContract(Namespace = "http://schemas.microsoft.com/netservices/2010/10/servicebus/connect")]
[KnownType(typeof(AllowRule))]
[KnownType(typeof(SharedAccessAuthorizationRule))]
public abstract class AuthorizationRule
- Inheritance
-
AuthorizationRule
- Derived
- Inherited Members
Fields
NameIdentifierClaimType
The name identifier claim rule.
public const string NameIdentifierClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
Field Value
RoleClaimType
The role claim rule.
public const string RoleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"
Field Value
RoleRoleClaimType
The role role claim rule.
public const string RoleRoleClaimType = "role"
Field Value
SharedAccessKeyClaimType
The shared access key claim rule.
public const string SharedAccessKeyClaimType = "sharedaccesskey"
Field Value
ShortNameIdentifierClaimType
The short name identifier claim rule.
public const string ShortNameIdentifierClaimType = "nameidentifier"
Field Value
ShortUpnClaimType
The short UPN claim rule.
public const string ShortUpnClaimType = "upn"
Field Value
UpnClaimType
The UPN claim rule.
public const string UpnClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn"
Field Value
Properties
ClaimType
Gets or sets the claim type.
public string ClaimType { get; set; }
Property Value
- string
The claim type.
ClaimValue
Gets or sets the claim value which is either ‘Send’, ‘Listen’, or ‘Manage’.
public string ClaimValue { get; set; }
Property Value
- string
The claim value which is either ‘Send’, ‘Listen’, or ‘Manage’.
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; }
Property Value
- DateTime
The date and time when the authorization rule was created.
IssuerName
Gets or sets the name identifier of the issuer.
public string IssuerName { get; set; }
Property Value
- string
The name identifier of the issuer.
KeyName
Gets or sets the authorization rule key name.
public abstract string KeyName { get; set; }
Property Value
- string
The authorization rule key name.
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; }
Property Value
- DateTime
The date and time when the authorization rule was modified.
Revision
Gets or sets the modification revision number.
[DataMember(IsRequired = false, Order = 1008, EmitDefaultValue = false)]
public long Revision { get; set; }
Property Value
- long
The modification revision number.
Rights
Gets or sets the list of rights.
public IEnumerable<AccessRights> Rights { get; set; }
Property Value
- IEnumerable<AccessRights>
The list of rights.
Methods
Clone()
Creates a copy of AuthorizationRule.
public virtual AuthorizationRule Clone()
Returns
- AuthorizationRule
A created copy of AuthorizationRule.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
- bool
true if the specified object is equal to the current object; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
The hash code for this instance.
OnValidate()
Enables derived classes to provide custom handling when validating the authorization rule.
protected virtual void OnValidate()
ValidateRights(IEnumerable<AccessRights>)
Checks the validity of the specified access rights.
protected virtual void ValidateRights(IEnumerable<AccessRights> value)
Parameters
value
IEnumerable<AccessRights>The access rights to check.