[keycloak-user] cdi @inject KeycloakSecurityContext

Matthew Broadhead matthew.broadhead at nbmlaw.co.uk
Thu Dec 7 09:00:27 EST 2017


thanks.  i already wrote a producer but i needed to handle a case where 
there was no request, i.e. when a process was run from a timer.  i ended 
up using a wrapper

On 07/12/2017 14:31, Niko Köbler wrote:
> I wrote an AccessTokenProducer, which is @RequestScoped and injected 
> it into an @ApplicationScoped Controller. It works.
>
> https://github.com/dasniko/keycloak-javaee-demo/blob/master/src/main/java/dasniko/bookbox/AccessTokenProducer.java
> https://github.com/dasniko/keycloak-javaee-demo/blob/master/src/main/java/dasniko/bookbox/BookController.java
>
> - Niko
>
>
>
>> Am 07.12.2017 um 11:51 schrieb Matthew Broadhead 
>> <matthew.broadhead at nbmlaw.co.uk <mailto:matthew.broadhead at nbmlaw.co.uk>>:
>>
>> is there any mechanism to @Inject KeycloakSecurityContext into an
>> @ApplicationScoped CDI?  i am trying to use @Produces but it is quite 
>> tricky
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org <mailto:keycloak-user at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>



More information about the keycloak-user mailing list