Make AuthorizationGrant implementation classes extensible

Issue #105 resolved
Former user created an issue

We extend some of the SDK classes to enable our scenarios and the ability to extended different grant implementations was one of them. I would be really helpful if you could remove the final keyword from the grant type classes. This will unblock us from adopting the latest and greatest changes!

Comments (19)

  1. Connect2id OSS

    No, there's no nightly. We'll do the changes and we'll push them to Maven Central shortly. We'll let you know here once it's done.

  2. kanishk panwar

    I see. Is there any specific reason to have classes final though? We would also like to support saml 1.1, so we would need to create a custom grant type.

  3. Connect2id OSS

    Is there any specific reason to have classes final though?

    The idea has been to create a grant class structure that would cover all possible std grants, and wouldn't need extending.

    But apparently that didn't work out in your case :)

  4. Connect2id OSS

    One problem I see with SAML 1.1- the GrantType has a private constructor.

    That was done to ensure only the constants are used, which include two important parameters -- whether client auth and an explicit client_id is required in the token request.

  5. kanishk panwar

    If you remove final, make your constructor public and make default constructor private then it would work the same way. Right?

  6. Connect2id OSS

    We just had an internal consultation on this issue. One way around it is to devise a parser or lookup interface, and use that as an optional argument to the static parse methods. That, however, would take some time to resolve.

    The good implication is that this only affects server-side processing of TokenRequests. If you're using the SDK on the client side only, we could just open up the GrantType constructor (as you suggested), so you can continue your work, and we'll deal with the server-side issue later.

    Please, let us know what your situation is.

  7. Log in to comment