Skip to content

Claim definition #75

@kliszaq

Description

@kliszaq

Hi guys nice work.
I have found one inconsistency regarding the claim objects. In the System.Security.Claims there is a constructor you are using:

//
// Summary:
// Initializes a new instance of the System.Security.Claims.Claim class with the
// specified claim type, and value.
//
// Parameters:
// type:
// The claim type.
//
// value:
// The claim value.
//
// Exceptions:
// T:System.ArgumentNullException:
// type or value is null.
public Claim(string type, string value);

As you can see if one of the input values is null then an exception is thrown.
In the MSSQL defintion for the table IdentityUserClaim the value is NULL, and therefore unaware dev will get the exception being thrown as soon as he tries to sign in:

CREATE TABLE [IdentityUserClaim](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [int] NOT NULL,
	[ClaimType] [varchar](256) NOT NULL,
	**[ClaimValue] [varchar](256) NULL,**
CONSTRAINT [PK_IdentityUserClaim] PRIMARY KEY CLUSTERED 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions