Class AuthserviceResource
- java.lang.Object
-
- no.priv.bang.authservice.web.security.resources.HtmlTemplateResource
-
- no.priv.bang.authservice.web.security.resources.AuthserviceResource
-
@Path("") public class AuthserviceResource extends HtmlTemplateResource
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.ws.rs.core.HttpHeaders
httpHeaders
private static String
LOGIN_ERROR
private static String
LOGIN_HTML
(package private) org.osgi.service.log.LogService
logservice
-
Constructor Summary
Constructors Constructor Description AuthserviceResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
checkLogin()
private org.jsoup.nodes.FormElement
fillFormValues(org.jsoup.nodes.Document html, String originalUri)
private org.jsoup.nodes.FormElement
fillFormValues(org.jsoup.nodes.Document html, String originalUri, String username, String password)
(package private) org.jsoup.nodes.FormElement
findForm(org.jsoup.nodes.Document html)
(package private) URI
findRedirectLocation()
InputStream
getIndex()
javax.ws.rs.core.Response
getLogin(String originalUri)
InputStream
getOpenIconicCss()
InputStream
getOpenIconicWoff()
javax.ws.rs.core.Response
logout()
(package private) String
notNullUrl(String redirectUrl)
javax.ws.rs.core.Response
postLogin(String username, String password, String originalUri)
(package private) void
updateOriginalUri(org.jsoup.nodes.FormElement form, String originalUri)
-
Methods inherited from class no.priv.bang.authservice.web.security.resources.HtmlTemplateResource
getClasspathResource, loadHtmlFile, loadHtmlFileAndSetMessage, setError, setMessage
-
-
-
-
Field Detail
-
LOGIN_ERROR
private static final String LOGIN_ERROR
- See Also:
- Constant Field Values
-
LOGIN_HTML
private static final String LOGIN_HTML
- See Also:
- Constant Field Values
-
httpHeaders
@Context javax.ws.rs.core.HttpHeaders httpHeaders
-
logservice
@Inject org.osgi.service.log.LogService logservice
-
-
Method Detail
-
getIndex
@GET @Produces("text/html") public InputStream getIndex()
-
getOpenIconicCss
@GET @Produces("text/css") @Path("open-iconic/font/css/open-iconic-bootstrap.min.css") public InputStream getOpenIconicCss()
-
getOpenIconicWoff
@GET @Produces("fond/woff") @Path("open-iconic/font/fonts/open-iconic.woff") public InputStream getOpenIconicWoff()
-
getLogin
@GET @Path("/login") @Produces("text/html") public javax.ws.rs.core.Response getLogin(@QueryParam("originalUri") String originalUri)
-
postLogin
@POST @Path("/login") @Consumes("application/x-www-form-urlencoded") @Produces("text/html") public javax.ws.rs.core.Response postLogin(@FormParam("username") String username, @FormParam("password") String password, @FormParam("originalUri") String originalUri)
-
logout
@GET @Path("/logout") @Produces("text/html") public javax.ws.rs.core.Response logout()
-
findRedirectLocation
URI findRedirectLocation()
-
checkLogin
@GET @Path("/check") @Produces("text/plain") public javax.ws.rs.core.Response checkLogin()
-
fillFormValues
private org.jsoup.nodes.FormElement fillFormValues(org.jsoup.nodes.Document html, String originalUri)
-
fillFormValues
private org.jsoup.nodes.FormElement fillFormValues(org.jsoup.nodes.Document html, String originalUri, String username, String password)
-
findForm
org.jsoup.nodes.FormElement findForm(org.jsoup.nodes.Document html)
-
updateOriginalUri
void updateOriginalUri(org.jsoup.nodes.FormElement form, String originalUri)
-
-