package com.perforce.workspace.tjuricek.p4oauth.util; import com.perforce.workspace.tjuricek.p4oauth.config.P4OAuthConfig; import javax.servlet.http.HttpServletRequest; public class HttpServletRequestHelper implements RequestQueryUtils { private HttpServletRequest httpServletRequest; private P4OAuthConfig config; public HttpServletRequestHelper(HttpServletRequest httpServletRequest, P4OAuthConfig p4OAuthConfig) { this.httpServletRequest = httpServletRequest; this.config = p4OAuthConfig; } public HttpServletRequest getHttpServletRequest() { return httpServletRequest; } public void setHttpServletRequest(HttpServletRequest httpServletRequest) { this.httpServletRequest = httpServletRequest; } public P4OAuthConfig getConfig() { return config; } public void setConfig(P4OAuthConfig config) { this.config = config; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; HttpServletRequestHelper that = (HttpServletRequestHelper) o; if (httpServletRequest != null ? !httpServletRequest.equals(that.httpServletRequest) : that.httpServletRequest != null) return false; if (config != null ? !config.equals(that.config) : that.config != null) return false; return true; } @Override public int hashCode() { int result = httpServletRequest != null ? httpServletRequest.hashCode() : 0; result = 31 * result + (config != null ? config.hashCode() : 0); return result; } @Override public String toString() { return "HttpServletRequestHelper"; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 9095 | tjuricek | Added some basic test data and renamed "workspace" to "workshop" in package name | ||
#1 | 9089 | tjuricek |
Moving some code that worked via some manual validation to the workshop. This just implements a basic code authorization grant scheme. Automated tests are forthcoming, awating some gradle plugin work that should sit outside of this project. |