[STS] Get a new token directly

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[STS] Get a new token directly

NicholaiX
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


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [STS] Get a new token directly

coheigea
Administrator
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 <[hidden email]>
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [STS] Get a new token directly

NicholaiX
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.
Loading...