Giter Site home page Giter Site logo

Comments (6)

rohe avatar rohe commented on June 18, 2024

That's a very good idea.
I guess it's on my shoulders to implement something like this though I would not mind if someone else stepped up to the plate.

from oidcendpoint.

rohe avatar rohe commented on June 18, 2024

On this issue, a while ago we added develop as the default branch to CryptoJWT and now requests a review before allowing a PR to go through to master.
We should probably do the same for the rest of the stack.

from oidcendpoint.

peppelinux avatar peppelinux commented on June 18, 2024

On this issue, a while ago we added develop as the default branch to CryptoJWT and now requests a review before allowing a PR to go through to master.
We should probably do the same for the rest of the stack.

Ok, I'll follow this line.
This issue Is related to oidcendpoint only

from oidcendpoint.

rohe avatar rohe commented on June 18, 2024

Sure, but I start to see it as a system (me :-)) error.

from oidcendpoint.

peppelinux avatar peppelinux commented on June 18, 2024

Could it be out of scope here?
oidc-op would be the the point to deal from, instead of oidcendpoint.
https://github.com/IdentityPython/oidc-op/blob/master/src/oidcop/configure.py

I'd suggest two method in that Class: .clean and .validate. The first run .validate and return a configuration without the unknow/invalid definition (a clean configuration) or {} is something went wrong. The latter would do:

  • for each element (key) - in the root and its childs - matches the model class (defined in oidcendpoint as configuration_models.py?), init it and .validate (in this latter class). The configuration node modelclass would inherit a class AbstractConfigurationNode and this would have these methods: __init__, validate and setup (NotImplemented). This latter would, for example, do some tasks like jwks creation (if readonly is false) or other kind of things, it would be executed only if validate returns True.

A ConfigurationNodeClass could be for example this:

class OpConfNode(AbstractConfigurationNode):
    server_info = dict(type=dict, 
                                 description='Documentation here',
                                 required_fields=['issuer', 'session_key','grant_types_supported'],
                                 optional_fields=[...],
                                 class=OpServerInfoConfNode)
    
     __init__(self, conf: Dict) -> None:
       # conf would be the only `op` value in the general conf
       # if not isinstance(dict) -> {} ... decide if do a decorator for this
       self.description # here the documentation       
       
   validate(self):
       for i in self.conf: 
           # (matches and initialize some more ConfNode) and validate them
           if not hasattr(self, i) -> not defined -> raise Exception 
           ...

   setup(self):
        do things.
        example: for each client, get their jwks and build the keyjar ... many other 

Could it be a starting point or would we like to spend some more words on this?

from oidcendpoint.

peppelinux avatar peppelinux commented on June 18, 2024

in idpy we discussed about it
https://pydantic-docs.helpmanual.io/

from oidcendpoint.

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.