Whether the given principal is authorized to use the Octoparts admin UI.
Whether the given principal is authorized to use the Octoparts admin UI.
an authenticated request with a com.m3.octoparts.auth.Principal
your decision
Use a post-authentication callback from an external authentication provider to construct a com.m3.octoparts.auth.Principal
Use a post-authentication callback from an external authentication provider to construct a com.m3.octoparts.auth.Principal
a Principal constructed from the HTTP request
What action to take when a request is not authenticated, e.g.
What action to take when a request is not authenticated, e.g. redirect to an authentication server.
The unauthenticated request
An absolute URL that you can use for a post-authentication callback. It will include the current (relative) URL as a query parameter, e.g. "http://octoparts:9000/auth/callback?origUrl=%2Fadmin"
What action to take when a request is authenticated but the principal is not authorized.
What action to take when a request is authenticated but the principal is not authorized.
an authenticated request with a com.m3.octoparts.auth.Principal
Try to extract a Principal from the session.
Try to extract a Principal from the session. The default implementation extracts the JSON-serialized Principal from the Play session cookie.
When the user logs out, they are redirected to the top page.
When the user logs out, they are redirected to the top page. This callback is your chance to clean up their session, e.g. delete cookies. The default implementation removes the Principal from the Play session cookie.
This is called when redirecting to the original URL after authentication has successfully completed.
This is called when redirecting to the original URL after authentication has successfully completed. This callback is your change to save the principal to a session. The default implementation saves it as JSON to the Play session cookie.
Authentication plugin for Octoparts should implement this trait.
e.g.