You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by NicholaiX <in...@gmail.com> on 2017/07/27 17:24:55 UTC

[STS] Get a new token directly

Hi,

Given a SecurityTokenServiceProvider instance, can I call it directly on the
server side, to get a new token? If so, could someone offer a pointer to a
sample?

What I'm trying to do is get a new token that I need to return to a client
as part of a non-soap, restful request.. something like:

1. Client executes a GET request
2. In the service-side GET handler, I want to call the STS (in the same
module) and issue a token
3. Build a GET response containing the token and return it to the client






--
View this message in context: http://cxf.547215.n5.nabble.com/STS-Get-a-new-token-directly-tp5782116.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: [STS] Get a new token directly

Posted by NicholaiX <in...@gmail.com>.
Thank you. No, the rest interfaces would not work in all cases (they may work
in the case of a unit test, but it's inefficient to call from one controller
to another (in the same service) via REST.

Regardless, I managed to get it to work, just have to be careful with
Spring's managed beans. Thank you.




--
View this message in context: http://cxf.547215.n5.nabble.com/STS-Get-a-new-token-directly-tp5782116p5782460.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: [STS] Get a new token directly

Posted by Colm O hEigeartaigh <co...@apache.org>.
There is an existing REST interface to the STS that you could re-use?

http://coheigea.blogspot.ie/2016/06/a-new-rest-interface-for-apache-cxf.html

Colm.

On Thu, Jul 27, 2017 at 6:24 PM, NicholaiX <in...@gmail.com>
wrote:

> Hi,
>
> Given a SecurityTokenServiceProvider instance, can I call it directly on
> the
> server side, to get a new token? If so, could someone offer a pointer to a
> sample?
>
> What I'm trying to do is get a new token that I need to return to a client
> as part of a non-soap, restful request.. something like:
>
> 1. Client executes a GET request
> 2. In the service-side GET handler, I want to call the STS (in the same
> module) and issue a token
> 3. Build a GET response containing the token and return it to the client
>
>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.
> com/STS-Get-a-new-token-directly-tp5782116.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com