Skip to content

Instantly share code, notes, and snippets.

@robertmassaioli
Created January 29, 2016 23:58
Show Gist options
  • Save robertmassaioli/51560977faf2a056062e to your computer and use it in GitHub Desktop.
Save robertmassaioli/51560977faf2a056062e to your computer and use it in GitHub Desktop.
// Verify that the request for this Atlassian Connect Web Panel has
// a valid JWT token from the Host Product
@FilterWith(JwtFilter.class)
public Result sayHello(Context context) {
// Get the tenant out of the Context (the tenant is provided by the JwtFilter)
final Tenant tenant = (Tenant) context.getAttribute(JwtFilter.ATLASSIAN_CONNECT_TENANT_ATTR);
// Pass the tenant baseUrl into the freemarker template as the variable productBaseUrl
return Results.html().render("productBaseUrl", tenant.baseUrl);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment