thinktecture-ident-server

Add a claim to JWT as an array?

大兔子大兔子 提交于 2019-11-30 18:26:30
Using thinktecture JWT authentication resource owner flow,i use the claims part of JWT for client consumption. My question is that if its possible to add claim in identity server and decode it as an array in client. There is no ClaimTypeValues for array type. As a workaround, var user = IdentityServerPrincipal.Create(response.UserName, response.UserName); user.Identities.First().AddClaims( new List<Claim>() { new Claim(ClaimTypes.Name, response.UserName), new Claim(ClaimTypes.Email, response.Email), new Claim(FullName, response.FullName), new Claim(AuthorizedCompanies,JsonConvert

Add a claim to JWT as an array?

瘦欲@ 提交于 2019-11-30 16:48:50
问题 Using thinktecture JWT authentication resource owner flow,i use the claims part of JWT for client consumption. My question is that if its possible to add claim in identity server and decode it as an array in client. There is no ClaimTypeValues for array type. As a workaround, var user = IdentityServerPrincipal.Create(response.UserName, response.UserName); user.Identities.First().AddClaims( new List<Claim>() { new Claim(ClaimTypes.Name, response.UserName), new Claim(ClaimTypes.Email, response

Identity Server 4: adding claims to access token

馋奶兔 提交于 2019-11-30 10:26:45
问题 I am using Identity Server 4 and Implicit Flow and want to add some claims to the access token, the new claims or attributes are "tenantId" and "langId". I have added langId as one of my scopes as below and then requesting that through identity server, but i get the tenantId also. How can this happen? This the list of scopes and client configuration: public IEnumerable<Scope> GetScopes() { return new List<Scope> { // standard OpenID Connect scopes StandardScopes.OpenId, StandardScopes

How to specify a certificate as the credentials for a wsTrustChannel with Thinktecture IdentityServer

佐手、 提交于 2019-11-30 09:31:26
问题 I would have thought that one could basically switch the client credentials from this: var clientCredentials = new ClientCredentials(); clientCredentials.UserName.UserName = "MyUserName" clientCredentials.UserName.Password = "MyPassword" to: var clientCredentials = new ClientCredentials(); clientCredentials.ClientCertificate.Certificate = myX509Certificate; and then create a wsTrustChannel to get a security token. wsTrustChannelFactory.SetCredentials(clientCredentials); var channel =

Identity Server 4: adding claims to access token

瘦欲@ 提交于 2019-11-29 20:29:54
I am using Identity Server 4 and Implicit Flow and want to add some claims to the access token, the new claims or attributes are "tenantId" and "langId". I have added langId as one of my scopes as below and then requesting that through identity server, but i get the tenantId also. How can this happen? This the list of scopes and client configuration: public IEnumerable<Scope> GetScopes() { return new List<Scope> { // standard OpenID Connect scopes StandardScopes.OpenId, StandardScopes.ProfileAlwaysInclude, StandardScopes.EmailAlwaysInclude, new Scope { Name="langId", Description = "Language",

Does OpenID Connect support the Resource Owner Password Credentials grant?

独自空忆成欢 提交于 2019-11-27 09:13:11
I have been using OAuth resource owner credential flow previously for authorization. However I would now like to consider using openid connect in pace of this, for authentication and authorization, and was wondering if the resource owner credential flow is supported in openid connect. Yes, OpenID Connect supports all OAuth 2.0 grant types including Resource Owner Password Credentials Grant and Client Credentials Grant. As we know, Authorization Code Grant and Implicit Grant are typical 3-legged flows including interaction between a client, an authorization server and a user. While the Resource