@Path(value="/oauth") public class OAuthAuthorizationProvider extends BennuRestResource
advice$innerCreate, advice$innerUpdate| Constructor and Description |
|---|
OAuthAuthorizationProvider() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gson.JsonElement |
getTokens(ExternalApplication app,
String username)
Obtains (creating if necessary) oauth tokens for an
ExternalApplication on behalf of a User. |
accessControl, accessControl, ok, readDomainObject, verifyAndGetRequestAuthorcreate, create, getBuilder, merge, parse, setDefault, toJson, update, update, view, view, view, view, view, view, viewPaginated, viewPaginated, viewPaginated@POST
@Path(value="/provider/{app}/{username}")
@Produces(value="application/json")
public com.google.gson.JsonElement getTokens(@PathParam(value="app")
ExternalApplication app,
@PathParam(value="username")
String username)
ExternalApplication on behalf of a User.
It will create an ApplicationUserAuthorization (if it does not exist yet) as well as the corresponding
ApplicationUserSession.
This should be used when a client ServiceApplication needs to access OAuthEndpoint endpoints on behalf of
specific User. Usually this happens in a scenario where both applications (oauth client and oauth server) live
in the same ecosystem.app - the application grant access tousername - the username of the user to generate tokens toCopyright © 2018 FenixEdu. All rights reserved.