GithubHelp home page GithubHelp logo

Comments (7)

pksorensen avatar pksorensen commented on July 16, 2024

I got my azure table storage to work except for for the Code Flows clients as I need to figure out what is the best approach for serializing ClaimsPrincipal on AuthorizationCode.

from identityserver3.

leastprivilege avatar leastprivilege commented on July 16, 2024

Cool.

I would simply serialize a list of claims.

We need a separate contrib repo or something similar. soon.

from identityserver3.

pksorensen avatar pksorensen commented on July 16, 2024

I was planing on just putting my stuff into a seperate repository as I can set it up with Myget.

Most annoying parts now is the referencing of local dlls and dependencies. I have used myget to link github repositories to their build service and have fresh dlls everytime something checks in to the repository. Considered anything like it? If not, is there anything in the license that keeps me from doing it on my forked repository as long as I do not publish it to nuget but just keep it on a myget repository.

I am in the process of writing a blog post about setting up a idsrv and my startup looks like this and everything get stored in azure storage tables. I will publish it in some days if I get everything to work outside localhost :)

            app.Map("/core", coreApp =>
            {
                Func<IdentityServerTableContext> storageContext = () => new IdentityServerTableContext(
                   CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("S-Innovations.IdSrv.StorageConnectionString")));

                var settings = new AzureTableStoreCoreSettings(storageContext(),
                    issuerUri: "https://idsrv.s-innovations.net",
                    siteName: "S-Innovations IdSrv",
                    certificateThumbprint: "6b7acc520305bfdb4f7252daeb2177cc091faae1",
                    publicHostAddress: "https://idsrv.s-innovations.net");

                var consent = new AzureTableStoreConsentService();
                var logger = new DebugLogger();

                var fact = new IdentityServerServiceFactory
                {
                    Logger = () => logger,
                    UserService = UserServiceFactory.Factory,
                    AuthorizationCodeStore = () => new AzureTableStoreAuthorizationCodeStore(storageContext()),
                    TokenHandleStore = () => new AzureTableStoreTokenHandlerStore(storageContext()),
                    CoreSettings = () => settings,
                    ConsentService = () => consent
                };              

                var options = new IdentityServerCoreOptions
                {
                    Factory = fact,
                    SocialIdentityProviderConfiguration = ConfigureSocialIdentityProviders
                };

                coreApp.UseIdentityServerCore(options);
            });
        }

from identityserver3.

pksorensen avatar pksorensen commented on July 16, 2024

Dominick, are the authentication type not important in the AuthorizationCode subject?

The following serialization would be sufficient then?

     private static Task<ClaimsPrincipal> SubjectDeserializer(EntityProperty property)
        {
            return Task.FromResult(new ClaimsPrincipal(new ClaimsIdentity(
                 JArray.Parse(property.StringValue)
                 .Select(j => new Claim(j["Type"].ToObject<string>(), j["Value"].ToObject<string>())))));
        }
        private static Task<EntityProperty> SubjectSerializer(ClaimsPrincipal subject)
        {            
            return Task.FromResult(new EntityProperty(
                JsonConvert.SerializeObject(subject.Claims.Select(c => new { c.Type, c.Value }))));
        }

from identityserver3.

leastprivilege avatar leastprivilege commented on July 16, 2024

No

from identityserver3.

leastprivilege avatar leastprivilege commented on July 16, 2024

@brockallen will create a persistence layer for EF next week. Everything else could be OSS contributions

from identityserver3.

pksorensen avatar pksorensen commented on July 16, 2024

Cool

from identityserver3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.