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
1 parent
3d1abec
commit 1b655ce
Showing
9 changed files
with
67 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.voelk.holidays.web; | ||
|
||
import com.google.appengine.api.users.*; | ||
import org.restlet.*; | ||
import org.restlet.data.*; | ||
import org.restlet.security.*; | ||
|
||
public class GaeAuthenticator extends ChallengeAuthenticator { | ||
public GaeAuthenticator(Context context, ChallengeScheme challengeScheme, String realm) { | ||
super(context, challengeScheme, realm); | ||
} | ||
|
||
@Override | ||
protected boolean authenticate(Request request, Response response) { | ||
if (!UserServiceFactory.getUserService().isUserLoggedIn()) { | ||
String path = request.getOriginalRef().getPath(); | ||
String loginURL = UserServiceFactory.getUserService().createLoginURL(path); | ||
response.redirectTemporary(loginURL); | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} | ||
} |
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
34 changes: 0 additions & 34 deletions
34
java/src/org/voelk/holidays/web/HolidayPagesApplication.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
java/src/org/voelk/holidays/web/HolidayWebservicesApplication.java
This file was deleted.
Oops, something went wrong.
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
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