c# - IdentityServer3 symmetric key issue on Relying Party -
i set selfhost(inmem ws-fed)
thinktecture identityserver3 project example , i'm trying use jwt, problem recieve tokens signed asymmetric key using alg rs256
need them symmetric using alg hs256
can use same key on client.
i have tried follow some examples configuring relying party on server no success.
for example, see following markup:
var relyingparty = new relyingparty() { enabled = true, realm = "urn:carbon", name = "test party", symmetricsigningkey = convert.frombase64string("r03w9kjersslh11px+r/o7eyfaadsmqfzd5haqzj6eu="), tokenlifetime = 120 };
but when try on code, have error on symmetricsigningkey
, says that:
'thinktecture.identityserver.wsfederation.models.relyingparty' not contain definition 'symmetricsigningkey'
what doing wrong?, in advance!
update
markup of startup file:
public void configuration(iappbuilder appbuilder) { var factory = inmemoryfactory.create( users: users.get(), clients: clients.get(), scopes: scopes.get() ); var options = new identityserveroptions { issueruri = "https://idsrv3.com", sitename = "thinktecture identityserver3 - wsfed", signingcertificate = certificate.get(), factory = factory, pluginconfiguration = configureplugins, }; appbuilder.useidentityserver(options); } private void configureplugins(iappbuilder pluginapp, identityserveroptions options) { var wsfedoptions = new wsfederationpluginoptions(options); // data sources in-memory services wsfedoptions.factory.register(new registration<ienumerable<relyingparty>>(relyingparties.get())); wsfedoptions.factory.relyingpartyservice = new registration<irelyingpartyservice>(typeof(inmemoryrelyingpartyservice)); pluginapp.usewsfederationplugin(wsfedoptions); }
markup of scope used:
new scope { name = "api1" }
markup of client used:
new client { clientname = "silicon on behalf of carbon client", clientid = "carbon", enabled = true, accesstokentype = accesstokentype.jwt, flow = flows.resourceowner, clientsecrets = new list<clientsecret> { new clientsecret("21b5f798-be55-42bc-8aa8-0025b903dc3b".sha256()) } }
markup of user used:
new inmemoryuser{subject = "bob", username = "bob", password = "bob", claims = new claim[] { new claim(constants.claimtypes.givenname, "bob"), new claim(constants.claimtypes.familyname, "smith"), new claim(constants.claimtypes.email, "bobsmith@email.com") } }
update
i check class model of relying party of identityserver3 , there's no property symmetric signing key... i'm lost...
any ideas?
Comments
Post a Comment