Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-597

Make Principal unwrappable

    XMLWordPrintable

Details

    • Epic
    • Resolution: Obsolete
    • Major
    • None
    • None
    • None
    • None
    • Principal should be unwrappable
    • To Do

    Description

      CDI allows to get injected a Principal but often you need to access the actual Principal instance when you need more than a name. Since the injection is a proxy (otherwise it would be broken in most of scoped wrapper instances cases) we would need a CDI solution to unwrap this instance.

      Solution I see without creating a new kind of API but just something specific to this case: CDIPrincipal extends Principal

      { <T> T unwrap(Class<T> t) }

      and allow to get it injected directly as Principal today.

      This issue can be linked to CDI-10 but here it is safe to add unwrap() where on CDI-10 it is not (too general).

      Attachments

        Activity

          People

            Unassigned Unassigned
            rmannibucau@gmail.com Romain Manni-Bucau
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: