-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ep.hoen@wxs.nl
committed
Sep 28, 2016
1 parent
83fff48
commit 028da67
Showing
48 changed files
with
8,587 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package oauthmodule.actions; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.FileReader; | ||
import java.io.IOException; | ||
import java.io.OutputStream; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
|
||
import com.mendix.core.Core; | ||
import com.mendix.externalinterface.connector.RequestHandler; | ||
import com.mendix.m2ee.api.IMxRuntimeRequest; | ||
import com.mendix.m2ee.api.IMxRuntimeResponse; | ||
import com.mendix.systemwideinterfaces.core.ISession; | ||
|
||
public class JA_LogoutHandler extends RequestHandler { | ||
|
||
@Override | ||
public void processRequest(IMxRuntimeRequest request, IMxRuntimeResponse response, String path) throws Exception | ||
{ | ||
final String LOGOUTPAGELOCATION = "/Oauth/logout.html"; | ||
ISession session = getSessionFromRequest(request); | ||
if (session != null){ | ||
Core.logout(session); | ||
} | ||
StringBuilder stringBuilder = new StringBuilder(); | ||
try (BufferedReader br = new BufferedReader(new FileReader(Core.getConfiguration().getResourcesPath()+LOGOUTPAGELOCATION))) | ||
{ | ||
String sCurrentLine; | ||
while ((sCurrentLine = br.readLine()) != null) { | ||
stringBuilder.append(sCurrentLine); | ||
} | ||
String logoutPage = stringBuilder.toString(); | ||
OutputStream outputStream = response.getOutputStream(); | ||
IOUtils.write(logoutPage, outputStream); | ||
IOUtils.closeQuietly(outputStream); | ||
} catch (IOException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// This file was generated by Mendix Modeler. | ||
// | ||
// WARNING: Only the following code will be retained when actions are regenerated: | ||
// - the import list | ||
// - the code between BEGIN USER CODE and END USER CODE | ||
// - the code between BEGIN EXTRA CODE and END EXTRA CODE | ||
// Other code you write will be lost the next time you deploy the project. | ||
// Special characters, e.g., é, ö, à, etc. are supported in comments. | ||
|
||
package oauthmodule.actions; | ||
|
||
import com.mendix.core.Core; | ||
import com.mendix.systemwideinterfaces.core.IContext; | ||
import com.mendix.webui.CustomJavaAction; | ||
|
||
public class JA_StartLogoutHandler extends CustomJavaAction<Boolean> | ||
{ | ||
public JA_StartLogoutHandler(IContext context) | ||
{ | ||
super(context); | ||
} | ||
|
||
@Override | ||
public Boolean executeAction() throws Exception | ||
{ | ||
// BEGIN USER CODE | ||
Core.addRequestHandler("logout/", new JA_LogoutHandler()); | ||
Core.getLogger("OAuthSignout").info("Registered logout requesthandler for 'logout/'"); | ||
return true; | ||
// END USER CODE | ||
} | ||
|
||
/** | ||
* Returns a string representation of this action | ||
*/ | ||
@Override | ||
public String toString() | ||
{ | ||
return "JA_StartLogoutHandler"; | ||
} | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
javasource/oauthmodule/actions/custom/doc/allclasses-frame.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<!-- NewPage --> | ||
<html lang="nl"> | ||
<head> | ||
<!-- Generated by javadoc (version 1.7.0_25) on Thu Oct 02 14:56:54 CEST 2014 --> | ||
<title>All Classes</title> | ||
<meta name="date" content="2014-10-02"> | ||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> | ||
</head> | ||
<body> | ||
<h1 class="bar">All Classes</h1> | ||
<div class="indexContainer"> | ||
<ul> | ||
<li><a href="oauthmodule/actions/custom/ErrorHandler.html" title="class in oauthmodule.actions.custom" target="classFrame">ErrorHandler</a></li> | ||
<li><a href="oauthmodule/actions/custom/ExecuteHttpRequest.html" title="class in oauthmodule.actions.custom" target="classFrame">ExecuteHttpRequest</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessCodeFacebook.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessCodeFacebook</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessCodeGoogle.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessCodeGoogle</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessCodeLinkedin.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessCodeLinkedin</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessToken.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessToken</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessTokenFacebook.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessTokenFacebook</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessTokenGoogle.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessTokenGoogle</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessTokenLinkedin.html" title="class in oauthmodule.actions.custom" target="classFrame">GetAccessTokenLinkedin</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetHttpRequest.html" title="class in oauthmodule.actions.custom" target="classFrame">GetHttpRequest</a></li> | ||
<li><a href="oauthmodule/actions/custom/LoginHelper.html" title="class in oauthmodule.actions.custom" target="classFrame">LoginHelper</a></li> | ||
<li><a href="oauthmodule/actions/custom/LogRecordHandler.html" title="class in oauthmodule.actions.custom" target="classFrame">LogRecordHandler</a></li> | ||
<li><a href="oauthmodule/actions/custom/OauthCallback.html" title="class in oauthmodule.actions.custom" target="classFrame">OauthCallback</a></li> | ||
<li><a href="oauthmodule/actions/custom/OauthSigninMultiIdP.html" title="class in oauthmodule.actions.custom" target="classFrame">OauthSigninMultiIdP</a></li> | ||
<li><a href="oauthmodule/actions/custom/PostHttpRequest.html" title="class in oauthmodule.actions.custom" target="classFrame">PostHttpRequest</a></li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
32 changes: 32 additions & 0 deletions
32
javasource/oauthmodule/actions/custom/doc/allclasses-noframe.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<!-- NewPage --> | ||
<html lang="nl"> | ||
<head> | ||
<!-- Generated by javadoc (version 1.7.0_25) on Thu Oct 02 14:56:54 CEST 2014 --> | ||
<title>All Classes</title> | ||
<meta name="date" content="2014-10-02"> | ||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> | ||
</head> | ||
<body> | ||
<h1 class="bar">All Classes</h1> | ||
<div class="indexContainer"> | ||
<ul> | ||
<li><a href="oauthmodule/actions/custom/ErrorHandler.html" title="class in oauthmodule.actions.custom">ErrorHandler</a></li> | ||
<li><a href="oauthmodule/actions/custom/ExecuteHttpRequest.html" title="class in oauthmodule.actions.custom">ExecuteHttpRequest</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessCodeFacebook.html" title="class in oauthmodule.actions.custom">GetAccessCodeFacebook</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessCodeGoogle.html" title="class in oauthmodule.actions.custom">GetAccessCodeGoogle</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessCodeLinkedin.html" title="class in oauthmodule.actions.custom">GetAccessCodeLinkedin</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessToken.html" title="class in oauthmodule.actions.custom">GetAccessToken</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessTokenFacebook.html" title="class in oauthmodule.actions.custom">GetAccessTokenFacebook</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessTokenGoogle.html" title="class in oauthmodule.actions.custom">GetAccessTokenGoogle</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetAccessTokenLinkedin.html" title="class in oauthmodule.actions.custom">GetAccessTokenLinkedin</a></li> | ||
<li><a href="oauthmodule/actions/custom/GetHttpRequest.html" title="class in oauthmodule.actions.custom">GetHttpRequest</a></li> | ||
<li><a href="oauthmodule/actions/custom/LoginHelper.html" title="class in oauthmodule.actions.custom">LoginHelper</a></li> | ||
<li><a href="oauthmodule/actions/custom/LogRecordHandler.html" title="class in oauthmodule.actions.custom">LogRecordHandler</a></li> | ||
<li><a href="oauthmodule/actions/custom/OauthCallback.html" title="class in oauthmodule.actions.custom">OauthCallback</a></li> | ||
<li><a href="oauthmodule/actions/custom/OauthSigninMultiIdP.html" title="class in oauthmodule.actions.custom">OauthSigninMultiIdP</a></li> | ||
<li><a href="oauthmodule/actions/custom/PostHttpRequest.html" title="class in oauthmodule.actions.custom">PostHttpRequest</a></li> | ||
</ul> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.