Question: in my current web application, I authenticate a user with the claim "customRole" (plus its value) and use the attribute "Authorize" to allow/deny access to actions. 
All works well until the user as more than one claim of the same type, the access gets denied all the time and when debugging I noticed that only one claim was created for the type "customRole" and its value is changed to a concatenated string with both values.

I was expecting two claims of the same type, but each with a different value.
I'm using ASPNET.Core 3.0 with IdentityServer4 but from what is written [here](https://github.com/IdentityServer/IdentityServer4/issues/2999), IdentityServer4 is not the problem.

For example, I'm adding the claims like so on the IdentityServer side: 

```cs
uClaims.Add(new Claim("customRole", "superadmin"));
uClaims.Add(new Claim("customRole", "simpleadmin"));

```

But when I get into the client application I get the claim like so:

```cs
customRole = ["superadmin","simpleadmin"]

```

This breaks all logic behind the attribute for the roles that i'm using on actions for the client application:

```cs
[Authorize(Roles = "superadmin")]

```

I tried following what is discussed in the previous link ([here](https://github.com/IdentityServer/IdentityServer4/issues/2999)), but the problem persists.

Is there anything missing so the claims get separated instead of one merged with different values? or using the authorize in a different way that allows the array of values?

Should also mention, that I started working with Asp.NetCore, IdentityServer4 and Roles for the first time in this last month, I'm in a learning curve.

Thank you for your time, cheers

Answer: 
> 
> Can I create unordered\_map for size of integer upto 10^9?
> 
> 
> 

Yes. Both `long long` and `long` are guaranteed to be able to represent all integers up to 109. Unordered map has no effect on that, as per documentation.

> 
> just want to store integers in a container and check whether a particular integer is there in the container or not?
> 
> 
> 

Sounds like you want a set rather than a map.

---

Also, don't do this:

> 
> 
> ```
> if(example[another_element])
> 
> ```
> 
> 

to check whether the map contains an element. This unnecessarily inserts an element into the map if it didn't exist yet.
You can use bitset, size 2^27 bytes (128mb). Bit 1 in the appropriate index will define "element within set", and bit 0 will be "element not in set".
Such set can be easy written as class like:

```
class bitset1G {
  public:
  bitset1G() { bzero(_data, sizeof(_data)); }
  void set(uint32_t x) { _data[x >> 5] |= (1 << (x & 0x1f)); }
  void clr(uint32_t x) { _data[x >> 5] &= ~(1 << (x & 0x1f)); }
  bool tst(uint32_t x) { return _data[x >> 5] & (1 << (x & 0x1f)); }
  private:
  int32_t _data[1 << 25]; // 1G bits
};

```