These are chat archives for IdentityServer/Thinktecture.IdentityServer3

31st
Jan 2015
H.İlter AKSENCER
@iltera
Jan 31 2015 06:24
@johnkors, Hi!
Have you finished your IdentityServer3.Contrib.Localization project?
I mean is it expected to be working at this stage?
John Korsnes
@johnkors
Jan 31 2015 08:01
Yes, it works for norwegian and english. What language do you need?
Richard Bennett
@dealproc
Jan 31 2015 08:25
looking at this: https://github.com/IdentityServer/Thinktecture.IdentityServer3.EntityFramework/blob/dev/Source/Core.EntityFramework/TokenCleanup.cs wouldn't it be just as convenient to run something during the Owin pipeline each time to do the same, instead of establishing a background worker/Task?
other question: any value in having an NHibernate library for IdentityServer?
H.İlter AKSENCER
@iltera
Jan 31 2015 09:11
@johnkors I forked your contrib project with new resx files for Turkish localization. That was what I needed. But having problems making it work with the descriptions you provided. In fact, I just added the assembly from nuget and added exactly the same config lines in startup, tried adding norwegian culture and uiculture in web.config, changing the browser's main language to norwegian and still getting english messages on wrong cridentials, for example.
Is there any specific details I should look into?
Actually, I have an open issue about that. Created the first issue for the first contrib project for idsrv :P
John Korsnes
@johnkors
Jan 31 2015 09:54
Send a PR to the dev branch, and I'll look into it. Out skiing now, but I'll have a look later today
it doesn't support browser based config at the moment. Only hard Coded at startup as the readme shows
Richard Bennett
@dealproc
Jan 31 2015 10:14
are you folks doing the relying parties hard-coded in v3 now?
Brock Allen
@brockallen
Jan 31 2015 13:28
you can also put them in the DB -- we have an EF implementation. the UI is still not done, but the DB part is
Brock Allen
@brockallen
Jan 31 2015 13:35
@dealproc feel free to start a discussion about that on the issue -- i'm looking for feedback
Richard Bennett
@dealproc
Jan 31 2015 13:41
freak.. frak... g'ah... :P
there's no way from the IdentityServerServiceFactory to resolve anything, is there?
Brock Allen
@brockallen
Jan 31 2015 13:42
no, you need to use the Func version of a Registration and use resolver => resolver.Resolve<T>()
do you need that for something?
Richard Bennett
@dealproc
Jan 31 2015 13:42
... from outside of Identity Server (e.g. when you're setting up the service factory)
Brock Allen
@brockallen
Jan 31 2015 13:43
if you need to resolve things from outside of a request, open an issue and we can think about adding it
Richard Bennett
@dealproc
Jan 31 2015 13:44
yea, so with NHibernate, the registrations are being done "inside" of Identity Server, if you will (within the Service Factory Setup)... factory.Register(new Registration<ISessionFactory>(resolver => sessionFactory)
was hoping i could grab that, since it's focused and setup for identity server already, and do the db initialization
Brock Allen
@brockallen
Jan 31 2015 13:45
is your session factory a singleton? there's a different overload for singletons.
Richard Bennett
@dealproc
Jan 31 2015 13:45
yes, should always be a singleton, no?
Brock Allen
@brockallen
Jan 31 2015 13:46
your sessionFactory is what i was asking about
Richard Bennett
@dealproc
Jan 31 2015 13:46
ah, right.. yes, a singleton it is supposed to be
Brock Allen
@brockallen
Jan 31 2015 13:46
is that a singleton? if so, then use the diff ctor that accepts an instance, rather than using the one that takes a Func
Richard Bennett
@dealproc
Jan 31 2015 13:47
:)
was just trying to get wired up... figured I could clean it up thereafter
Richard Bennett
@dealproc
Jan 31 2015 14:11
the other thing that I'm tickling in my head is if there should be a general persistence model that is utilized, much like how BrockAllen.MembershipReboot was refactored to support document and relational persistence stores?
(realize that's asking a lot.. and that you folks are staring down v1 of IdSrv v3... but just brickwalling it)
Brock Allen
@brockallen
Jan 31 2015 20:00
well, that's what various "store" services are there for -- they abstract accessing data about clients, scopes, and tokens
they don't go as far a MR did for defining the models, tho -- that's work for the implementation.
Brian Donahue
@briandonahue
Jan 31 2015 22:41
Can anyone give me any tips/links on seeing detailed trace info on the OIDC middleware? I’m not getting it configured right to see messages I care about. I need to figure out why my app seems to be regularly redirecting to idsrv and recreating the auth cookie when it already exists :\
  <system.diagnostics>
    <trace autoflush="true"
           indentsize="4">
      <listeners>
        <remove name="Default" />
      </listeners>
    </trace>
    <switches>
      <add name="Microsoft.Owin" value="Verbose" />
      <add name="Microsoft.Owin.Security" value="Verbose" />
      <add name="Microsoft.Owin.Security.OpenIdConnect" value="Verbose" />
    </switches>
    <sharedListeners>
        <add name="myListener"
             type="System.Diagnostics.TextWriterTraceListener"
             initializeData="Trace.log" />
    </sharedListeners>

    <sources>
      <source name="Microsoft.Owin">
        <listeners>
          <add name="myListener" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
There is my hacky attempt at configuring it. I obv. don’t really know what I’m doing here.
Brock Allen
@brockallen
Jan 31 2015 22:43
did you check the asp.net website for any docs on it?
if not there, then i'd ask in owin in jabbr
Brian Donahue
@briandonahue
Jan 31 2015 22:45
I have been googling and messing with it for an hour. I have never really used tracing, and finding it confusing to understand how to configure it. But you’re right, probably should ask there. I was able to get idsrv tracing working from the docs, but you guys made it pretty easy :)
Brock Allen
@brockallen
Jan 31 2015 22:57
yea, to be honest i don't know if or how to get it enabled. i always just read thru the source to understand how it's working (or why it doesn't do what i want)
Brian Donahue
@briandonahue
Jan 31 2015 22:59
yeah. I was hoping to see it live in our load-balanced env, but I can try stepping through locally.
Richard Bennett
@dealproc
Jan 31 2015 23:32
@brockallen agreed. Just felt like I wound up creating (read: I copied) a lot of what you had in the EntityFramework implementation to get NHibernate going. I'm left with 1 refactor for MR latest & greatest "Relational" objects, and I think i'm there.