Re: JMS to Secured Spring Method with PreAuthorize annotation

2012-11-14 Thread Claus Ibsen
thentication.UsernamePasswordAuthenticationToken("abcdefg", >> "1234", authorities); >> >> Subject subject = new javax.security.auth.Subject(); >> subject.getPrincipals().add(auth); >> >> Endpoint endpoint = camel.getEndpoint("jms:queue:hello&q

Re: JMS to Secured Spring Method with PreAuthorize annotation

2012-11-13 Thread Willem jiang
stem.out.println(camelTemplate.requestBodyAndHeader(endpoint, "john" , > Exchange.AUTHENTICATION, subject)); > > *CLIENT (option b)* > Producer producer = endpoint.createProducer(); > producer.start(); > Exchange exchange = endpoint.createExchange(ExchangePattern.InOut); > exchange.getIn().setBody("john"); > exchange.getIn().getHeaders().put(Exchange.AUTHENTICATION, subject); > producer.process(exchange); > System.out.println(".. the result is " + exchange.getOut().getBody()); > producer.stop(); > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/JMS-to-Secured-Spring-Method-with-PreAuthorize-annotation-tp5722696.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).

JMS to Secured Spring Method with PreAuthorize annotation

2012-11-13 Thread john.mo...@kronos.com
exchange.getIn().getHeaders().put(Exchange.AUTHENTICATION, subject); producer.process(exchange); System.out.println(".. the result is " + exchange.getOut().getBody()); producer.stop(); -- View this message in context: http://camel.465427.n5.nabble.com/JMS-to-Secured-Spring-Method-with-PreAuthorize-annotation-tp5722696.html Sent from the Camel - Users mailing list archive at Nabble.com.