[smarcet] - Refs #4576, #4578 : XRDS discovery and Authentication Workflow main classes

This commit is contained in:
smarcet 2013-10-16 13:29:18 -03:00
parent 9177607bfe
commit 9c407de37d
44 changed files with 1331 additions and 364 deletions

View File

@ -2,6 +2,7 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -1,42 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" name="Default" comment="" />
<list default="true" id="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/auth/AuthService.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/auth/AuthenticationServiceProvider.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/services/AuthenticationStrategy.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/auth/CustomAuthProvider.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/auth/CustomUser.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/services/IAuthService.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/services/IMementoOpenIdRequestService.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/handlers/IOpenIdAuthenticationStrategy.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/strategies/IOpenIdResponseStrategy.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/exceptions/InvalidKVFormat.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/exceptions/InvalidOpenIdMessageException.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/services/MementoRequestService.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/requests/OpenIdAuthenticationRequest.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/responses/OpenIdDirectGenericErrorResponse.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/responses/OpenIdDirectResponse.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/responses/OpenIdIndirectResponse.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/requests/OpenIdRequest.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/responses/OpenIdResponse.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/libs/openid/strategies/OpenIdResponseStrategyFactoryMethod.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/services/ServicesProvider.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/controllers/UserController.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/consent.blade.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/error.blade.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/home.blade.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/layout.blade.php" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/login.blade.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/DiscoveryController.php" afterPath="$PROJECT_DIR$/app/controllers/DiscoveryController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/HomeController.php" afterPath="$PROJECT_DIR$/app/controllers/HomeController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/libs/openid/IOpenIdProtocol.php" afterPath="$PROJECT_DIR$/app/libs/openid/IOpenIdProtocol.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdAuthenticationRequestHandler.php" afterPath="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdAuthenticationRequestHandler.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/libs/openid/OpenIdMessage.php" afterPath="$PROJECT_DIR$/app/libs/openid/OpenIdMessage.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdMessageHandler.php" afterPath="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdMessageHandler.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/libs/openid/OpenIdProtocol.php" afterPath="$PROJECT_DIR$/app/libs/openid/OpenIdProtocol.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/OpenIdProviderController.php" afterPath="$PROJECT_DIR$/app/controllers/OpenIdProviderController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/libs/openid/OpenIdServiceProvider.php" afterPath="$PROJECT_DIR$/app/libs/openid/OpenIdServiceProvider.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/config/app.php" afterPath="$PROJECT_DIR$/app/config/app.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/config/auth.php" afterPath="$PROJECT_DIR$/app/config/auth.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/composer.json" afterPath="$PROJECT_DIR$/composer.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/filters.php" afterPath="$PROJECT_DIR$/app/filters.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/start/global.php" afterPath="$PROJECT_DIR$/app/start/global.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/routes.php" afterPath="$PROJECT_DIR$/app/routes.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/bootstrap/start.php" afterPath="$PROJECT_DIR$/bootstrap/start.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/vcs.xml" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="openidIdp.iws" />
<ignored path=".idea/workspace.xml" />
<file path="/DiscoveryController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381780458797" ignored="false" />
<file path="/DiscoveryController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381940543859" ignored="false" />
<file path="/DiscoveryControllerTest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381770482258" ignored="false" />
<file path="/2013_10_14_155702_create_extension_table.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381766606263" ignored="false" />
<file path="/ServerExtension.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381766727808" ignored="false" />
<file path="/ServerExtensionTest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381768563012" ignored="false" />
<file path="/tmp/ide-phpunit.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381787642400" ignored="false" />
<file path="/fragment.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381787792984" ignored="false" />
<file path="/HomeController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381768818138" ignored="false" />
<file path="/tmp/ide-phpunit.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381932516605" ignored="false" />
<file path="/fragment.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381939546131" ignored="false" />
<file path="/HomeController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381939659852" ignored="false" />
<file path="/XrdsDocumentBuilder.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381773998567" ignored="false" />
<file path="/a.dummy" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381783802820" ignored="false" />
<file path="/Dummy.txt" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381777738465" ignored="false" />
<file path="/a.dummy" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381860882058" ignored="false" />
<file path="/Dummy.txt" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381928444614" ignored="false" />
<file path="/IXRDSService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381773588280" ignored="false" />
<file path="/XRDSService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381772341971" ignored="false" />
<file path="/XRDSDocumentTest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381774070136" ignored="false" />
<file path="/OpenIdProtocol.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381784562638" ignored="false" />
<file path="/OpenIdProtocol.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381931590407" ignored="false" />
<file path="/IServerExtensionsRepository.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381777956130" ignored="false" />
<file path="/IServerConfigurationRepository.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381778188675" ignored="false" />
<file path="/OpenIdProtocolTest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381781851602" ignored="false" />
<file path="/app.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381780572613" ignored="false" />
<file path="/app.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381929077974" ignored="false" />
<file path="/RepositoriesServiceProvider.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381780638618" ignored="false" />
<file path="/ServerConfigurationRepositoryEloquent.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381781085301" ignored="false" />
<file path="/ServerExtensionsRepositoryEloquent.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381781161806" ignored="false" />
<file path="/IOpenIdProtocol.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381783163549" ignored="false" />
<file path="/*.regexp" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381781743384" ignored="false" />
<file path="/IOpenIdProtocol.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381858939899" ignored="false" />
<file path="/*.regexp" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381929360132" ignored="false" />
<file path="/IOpenIdMessageHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381784676935" ignored="false" />
<file path="/OpenIdAuthenticationRequestHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381783827702" ignored="false" />
<file path="/OpenIdAuthenticationRequestHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381931145138" ignored="false" />
<file path="/OpenIdSessionAssociationRequestHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381784308892" ignored="false" />
<file path="/OpenIdCheckAuthenticationRequestHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381783903261" ignored="false" />
<file path="/OpenIdMessage.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381787153443" ignored="false" />
<file path="/OpenIdMessageHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381784626399" ignored="false" />
<file path="/OpenIdProviderController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381787496595" ignored="false" />
<file path="/OpenIdMessage.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381850575982" ignored="false" />
<file path="/OpenIdMessageHandler.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381861117166" ignored="false" />
<file path="/OpenIdProviderController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381931867204" ignored="false" />
<file path="/OpenIdProviderControllerTest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381786052450" ignored="false" />
<file path="/routes.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381787719854" ignored="false" />
<file path="/routes.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381938649068" ignored="false" />
<file path="/OpenIdResponse.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381845379523" ignored="false" />
<file path="/OpenIdDirectResponse.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381845248602" ignored="false" />
<file path="/InvalidKVFormat.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381844314772" ignored="false" />
<file path="/OpenIdDirectGenericErrorResponse.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381845936007" ignored="false" />
<file path="/OpenIdIndirectResponse.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381849721836" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/openstack/code/training/Training.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/registration/code/EditProfileForm.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/registration/code/EditProfilePage.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/openstack/code/Project.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/openstack/code/SpeakerVotingPage.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/openstack/code/training/Frontend/TrainingDirectoryPage.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/registration/code/MemberDecorator.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/openstack/_config.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381848984796" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/registration/code/RegistrationPage.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381847865179" ignored="false" />
<file path="$PROJECT_DIR$/../../www.openstack.org/openstack/_ss_environment.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381848972509" ignored="false" />
<file path="/_config.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381848980103" ignored="false" />
<file path="/OpenIdRequest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381937700057" ignored="false" />
<file path="/OpenIdAuthenticationRequest.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381938030158" ignored="false" />
<file path="$PROJECT_DIR$/../../LaravelTest/test/bootstrap/start.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381851672863" ignored="false" />
<file path="/CustomUser.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381851695261" ignored="false" />
<file path="/IAuthService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381935330879" ignored="false" />
<file path="/AuthService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381935287069" ignored="false" />
<file path="/IMementoRequestService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381852639908" ignored="false" />
<file path="/layout.blade.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381853928575" ignored="false" />
<file path="/error.blade.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381854085102" ignored="false" />
<file path="/global.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381857547950" ignored="false" />
<file path="/IOpenIdResponseStrategy.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381858495548" ignored="false" />
<file path="/OpenIdResponseStrategyFactoryMethod.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381858678733" ignored="false" />
<file path="/IAuthenticationStrategy.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381861012975" ignored="false" />
<file path="/UserController.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381938151332" ignored="false" />
<file path="/login.blade.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381937249526" ignored="false" />
<file path="/consent.blade.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381863616193" ignored="false" />
<file path="/MementoRequestService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381934837267" ignored="false" />
<file path="/AuthenticationStrategy.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381931567723" ignored="false" />
<file path="/ServicesProvider.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381865901188" ignored="false" />
<file path="/AuthenticationServiceProvider.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381866053563" ignored="false" />
<file path="/IMementoOpenIdRequestService.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381930275650" ignored="false" />
<file path="/filters.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381939274202" ignored="false" />
<file path="/home.blade.php" changelist="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" time="1381939705628" ignored="false" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -66,25 +150,33 @@
<setting name="OPEN_NEW_TAB" value="false" />
</FindUsagesManager>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitLogSettings">
<option name="myDateState">
<MyDateState />
</option>
</component>
<component name="IdeDocumentHistory">
<option name="changedFiles">
<list>
<option value="$PROJECT_DIR$/app/tests/mocks/ServerExtensionsRepositoryMock.php" />
<option value="$PROJECT_DIR$/composer.json" />
<option value="$PROJECT_DIR$/app/controllers/DiscoveryController.php" />
<option value="$PROJECT_DIR$/app/tests/OpenIdProtocolTest.php" />
<option value="$PROJECT_DIR$/app/libs/openid/OpenIdServiceProvider.php" />
<option value="$PROJECT_DIR$/app/libs/openid/IOpenIdProtocol.php" />
<option value="$PROJECT_DIR$/app/libs/openid/handlers/IOpenIdMessageHandler.php" />
<option value="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdAuthenticationRequestHandler.php" />
<option value="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdSessionAssociationRequestHandler.php" />
<option value="$PROJECT_DIR$/app/tests/OpenIdProviderControllerTest.php" />
<option value="$PROJECT_DIR$/app/libs/openid/OpenIdProtocol.php" />
<option value="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdCheckAuthenticationRequestHandler.php" />
<option value="$PROJECT_DIR$/app/libs/openid/handlers/OpenIdMessageHandler.php" />
<option value="$PROJECT_DIR$/app/controllers/OpenIdProviderController.php" />
<option value="$PROJECT_DIR$/app/routes.php" />
<option value="$PROJECT_DIR$/app/libs/openid/OpenIdMessage.php" />
<option value="$PROJECT_DIR$/app/services/MementoRequestService.php" />
<option value="$PROJECT_DIR$/app/libs/openid/services/IAuthService.php" />
<option value="$PROJECT_DIR$/app/libs/auth/AuthService.php" />
<option value="$PROJECT_DIR$/app/views/login.blade.php" />
<option value="$PROJECT_DIR$/app/libs/openid/requests/OpenIdRequest.php" />
<option value="$PROJECT_DIR$/app/libs/openid/requests/OpenIdAuthenticationRequest.php" />
<option value="$PROJECT_DIR$/app/routes.php" />
<option value="$PROJECT_DIR$/app/services/AuthenticationStrategy.php" />
<option value="$PROJECT_DIR$/app/filters.php" />
<option value="$PROJECT_DIR$/app/controllers/UserController.php" />
<option value="$PROJECT_DIR$/app/controllers/HomeController.php" />
<option value="$PROJECT_DIR$/app/views/home.blade.php" />
<option value="$PROJECT_DIR$/app/controllers/DiscoveryController.php" />
</list>
</option>
</component>
@ -116,7 +208,7 @@
</profile-state>
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
@ -142,7 +234,6 @@
<sortByType />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
@ -161,38 +252,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="vendor" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="vendor" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="composer" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
@ -207,150 +266,28 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="tests" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libs" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openid" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libs" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openid" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="repositories" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="libs" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openid" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="handlers" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="controllers" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="openidIdp" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="app" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="options.splitter.main.proportions" value="0.3" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="options.lastSelected" value="Configurable.PHP.PHPUnit" />
<property name="options.lastSelected" value="Configurable.PHP.Debug" />
<property name="recentsLimit" value="5" />
<property name="restartRequiresConfirmation" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../php-openid" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../LaravelTest" />
<property name="GoToClass.includeJavaFiles" value="false" />
<property name="options.searchVisible" value="true" />
<property name="options.splitter.details.proportions" value="0.2" />
</component>
<component name="RunManager" selected="PHPUnit.OpenIdProviderControllerTest">
<component name="RunManager" selected="PHP Web Application.dev.openstackid.com">
<configuration default="false" name="OpenIdProviderController.php" type="PhpLocalRunConfigurationType" factoryName="PHP Console" temporary="true" path="$PROJECT_DIR$/app/controllers/OpenIdProviderController.php">
<RunnerSettings RunnerId="PhpScriptDebugRunner" />
<ConfigurationWrapper RunnerId="PhpScriptDebugRunner" />
<method />
</configuration>
<configuration default="false" name="DiscoveryControllerTest" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true">
<TestRunner class="DiscoveryControllerTest" file="$PROJECT_DIR$/app/tests/DiscoveryControllerTest.php" scope="Class" />
<RunnerSettings RunnerId="PhpUnitDebugRunner" />
@ -373,11 +310,6 @@
<ConfigurationWrapper RunnerId="PhpUnitDebugRunner" />
<method />
</configuration>
<configuration default="false" name="OpenIdProviderController.php" type="PhpLocalRunConfigurationType" factoryName="PHP Console" temporary="true" path="$PROJECT_DIR$/app/controllers/OpenIdProviderController.php">
<RunnerSettings RunnerId="PhpScriptDebugRunner" />
<ConfigurationWrapper RunnerId="PhpScriptDebugRunner" />
<method />
</configuration>
<configuration default="false" name="OpenIdProviderControllerTest" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true">
<TestRunner class="OpenIdProviderControllerTest" file="$PROJECT_DIR$/app/tests/OpenIdProviderControllerTest.php" scope="Class" />
<RunnerSettings RunnerId="PhpUnitDebugRunner" />
@ -394,17 +326,17 @@
<configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
<method />
</configuration>
<configuration default="false" name="dev.openstackid.com" type="PhpWebAppRunConfigurationType" factoryName="PHP Web Application" browser="FIREFOX" server_name="dev.openstackid.com">
<configuration default="false" name="dev.openstackid.com" type="PhpWebAppRunConfigurationType" factoryName="PHP Web Application" browser="CHROME" server_name="dev.openstackid.com">
<RunnerSettings RunnerId="PhpWebAppDebugRunner" />
<ConfigurationWrapper RunnerId="PhpWebAppDebugRunner" />
<method />
</configuration>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="PHPUnit.DiscoveryControllerTest" />
<item index="0" class="java.lang.String" itemvalue="PHP Script.OpenIdProviderController.php" />
<item index="1" class="java.lang.String" itemvalue="PHP Web Application.dev.openstackid.com" />
<item index="2" class="java.lang.String" itemvalue="PHPUnit.XRDSDocumentTest" />
<item index="3" class="java.lang.String" itemvalue="PHPUnit.DiscoveryControllerTest.testIdpDiscovery" />
<item index="4" class="java.lang.String" itemvalue="PHP Script.OpenIdProviderController.php" />
<item index="2" class="java.lang.String" itemvalue="PHPUnit.DiscoveryControllerTest" />
<item index="3" class="java.lang.String" itemvalue="PHPUnit.XRDSDocumentTest" />
<item index="4" class="java.lang.String" itemvalue="PHPUnit.DiscoveryControllerTest.testIdpDiscovery" />
<item index="5" class="java.lang.String" itemvalue="PHPUnit.OpenIdProviderControllerTest" />
</list>
<recent_temporary>
@ -418,6 +350,23 @@
</recent_temporary>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="all">
<option name="USER" value="" />
<option name="PASSWORD" value="" />
<option name="mySSHConnectionTimeout" value="30000" />
<option name="mySSHReadTimeout" value="30000" />
<option name="LAST_MERGED_REVISION" />
<option name="MERGE_DRY_RUN" value="false" />
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
<option name="FORCE_UPDATE" value="false" />
<option name="IGNORE_EXTERNALS" value="false" />
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="cdc3929b-040d-4e45-bbd9-fa8f8bc87073" name="Default" comment="" />
@ -430,23 +379,23 @@
<frame x="65" y="32" width="1301" height="728" extended-state="0" />
<editor active="false" />
<layout>
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.4115292" sideWeight="0.6080139" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.39198607" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27702162" sideWeight="0.6445993" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3554007" sideWeight="0.6180945" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3554007" sideWeight="0.38190553" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3292683" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
@ -510,165 +459,193 @@
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/tests/DiscoveryControllerTest.php</url>
<line>12</line>
<option name="timeStamp" value="33" />
<url>file://$PROJECT_DIR$/app/libs/auth/AuthService.php</url>
<line>21</line>
<option name="timeStamp" value="80" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/controllers/DiscoveryController.php</url>
<line>24</line>
<option name="timeStamp" value="34" />
<url>file://$PROJECT_DIR$/app/libs/auth/CustomAuthProvider.php</url>
<line>43</line>
<option name="timeStamp" value="83" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/controllers/DiscoveryController.php</url>
<line>16</line>
<option name="timeStamp" value="35" />
<url>file://$PROJECT_DIR$/app/libs/auth/CustomAuthProvider.php</url>
<line>57</line>
<option name="timeStamp" value="84" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/tests/OpenIdProviderControllerTest.php</url>
<line>12</line>
<option name="timeStamp" value="36" />
<url>file://$PROJECT_DIR$/app/libs/auth/CustomUser.php</url>
<line>31</line>
<option name="timeStamp" value="85" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/controllers/OpenIdProviderController.php</url>
<line>22</line>
<option name="timeStamp" value="38" />
<url>file://$PROJECT_DIR$/app/libs/auth/CustomUser.php</url>
<line>21</line>
<option name="timeStamp" value="86" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/libs/openid/OpenIdMessage.php</url>
<line>20</line>
<option name="timeStamp" value="39" />
<url>file://$PROJECT_DIR$/app/controllers/UserController.php</url>
<line>33</line>
<option name="timeStamp" value="87" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Auth/Guard.php</url>
<line>271</line>
<option name="timeStamp" value="89" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/start/global.php</url>
<line>61</line>
<option name="timeStamp" value="91" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/filters.php</url>
<line>100</line>
<option name="timeStamp" value="93" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/app/controllers/HomeController.php</url>
<line>7</line>
<option name="timeStamp" value="94" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php</url>
<line>57</line>
<option name="timeStamp" value="95" />
</line-breakpoint>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php</url>
<line>297</line>
<option name="timeStamp" value="96" />
</line-breakpoint>
</breakpoints>
<breakpoints-dialog>
<breakpoints-dialog />
</breakpoints-dialog>
<option name="time" value="40" />
<option name="time" value="97" />
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Exception/Handler.php">
<provider selected="true" editor-type-id="text-editor">
<state line="257" column="0" selection-start="6464" selection-end="6464" vertical-scroll-proportion="0.306962">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/services/AuthenticationStrategy.php">
<provider selected="true" editor-type-id="text-editor">
<state line="17" column="5" selection-start="445" selection-end="445" vertical-scroll-proportion="0.36082473">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/auth/AuthService.php">
<provider selected="true" editor-type-id="text-editor">
<state line="21" column="0" selection-start="367" selection-end="367" vertical-scroll-proportion="0.35759494">
<folding>
<element signature="e#183#216#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/filters.php">
<provider selected="true" editor-type-id="text-editor">
<state line="100" column="0" selection-start="2792" selection-end="2792" vertical-scroll-proportion="-6.9166665">
<folding>
<element signature="e#2091#2140#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="22" column="8" selection-start="634" selection-end="634" vertical-scroll-proportion="-8.791667">
<folding>
<element signature="e#165#214#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/login.blade.php">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="943" vertical-scroll-proportion="-0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/views/home.blade.php">
<provider selected="true" editor-type-id="text-editor">
<state line="4" column="40" selection-start="128" selection-end="128" vertical-scroll-proportion="-2.5">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/XRDS/XRDSDocumentBuilder.php">
<provider selected="true" editor-type-id="text-editor">
<state line="14" column="44" selection-start="266" selection-end="286" vertical-scroll-proportion="0.5221519">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Client.php">
<provider selected="true" editor-type-id="text-editor">
<state line="8" column="26" selection-start="318" selection-end="318" vertical-scroll-proportion="0.18987341">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php">
<provider selected="true" editor-type-id="text-editor">
<state line="31" column="25" selection-start="957" selection-end="957" vertical-scroll-proportion="0.44554454">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php">
<provider selected="true" editor-type-id="text-editor">
<state line="226" column="5" selection-start="5753" selection-end="5759" vertical-scroll-proportion="0.3309091">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/tests/DiscoveryControllerTest.php">
<provider selected="true" editor-type-id="text-editor">
<state line="9" column="47" selection-start="197" selection-end="214" vertical-scroll-proportion="-2.375">
<folding>
<element signature="e#6#165#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/OpenIdServiceProvider.php">
<provider selected="true" editor-type-id="text-editor">
<state line="14" column="62" selection-start="322" selection-end="322" vertical-scroll-proportion="-2.9166667">
<state line="15" column="25" selection-start="552" selection-end="552" vertical-scroll-proportion="-5.625">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/handlers/OpenIdVoidRequestHandler.php">
<entry file="file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="30" selection-start="201" selection-end="225" vertical-scroll-proportion="0.30508474">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/handlers/OpenIdCheckAuthenticationRequestHandler.php">
<provider selected="true" editor-type-id="text-editor">
<state line="14" column="66" selection-start="288" selection-end="288" vertical-scroll-proportion="-4.0833335">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/DiscoveryController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="24" column="84" selection-start="557" selection-end="633" vertical-scroll-proportion="0.45762712">
<folding>
<element signature="e#6#165#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Routing/Controllers/Controller.php">
<provider selected="true" editor-type-id="text-editor">
<state line="125" column="0" selection-start="3086" selection-end="3086" vertical-scroll-proportion="-3.5416667">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/tests/OpenIdProviderControllerTest.php">
<provider selected="true" editor-type-id="text-editor">
<state line="21" column="70" selection-start="733" selection-end="752" vertical-scroll-proportion="-4.5416665">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Routing/Route.php">
<provider selected="true" editor-type-id="text-editor">
<state line="62" column="0" selection-start="1606" selection-end="1606" vertical-scroll-proportion="3.5019455">
<state line="16" column="6" selection-start="325" selection-end="325" vertical-scroll-proportion="18.291666">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/routes.php">
<provider selected="true" editor-type-id="text-editor">
<state line="16" column="10" selection-start="573" selection-end="573" vertical-scroll-proportion="-4.375">
<state line="14" column="12" selection-start="447" selection-end="457" vertical-scroll-proportion="0.23734178">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/composer/ClassLoader.php">
<entry file="file://$PROJECT_DIR$/app/controllers/HomeController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="186" column="0" selection-start="5045" selection-end="5045" vertical-scroll-proportion="0.30141845">
<state line="1" column="0" selection-start="6" selection-end="42" vertical-scroll-proportion="-0.625">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/OpenIdMessage.php">
<entry file="file://$PROJECT_DIR$/app/controllers/DiscoveryController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="49" column="0" selection-start="1419" selection-end="1419" vertical-scroll-proportion="-4.4583335">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/controllers/OpenIdProviderController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="24" column="0" selection-start="582" selection-end="582" vertical-scroll-proportion="-3.75">
<state line="10" column="36" selection-start="231" selection-end="231" vertical-scroll-proportion="0.18987341">
<folding>
<element signature="e#166#193#0" expanded="true" />
<element signature="e#167#194#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/OpenIdProtocol.php">
<provider selected="true" editor-type-id="text-editor">
<state line="63" column="0" selection-start="2142" selection-end="2142" vertical-scroll-proportion="-6.7083335">
<folding>
<element signature="e#187#242#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/handlers/OpenIdMessageHandler.php">
<provider selected="true" editor-type-id="text-editor">
<state line="24" column="0" selection-start="467" selection-end="467" vertical-scroll-proportion="-3.7083333">
<folding>
<element signature="e#195#220#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/libs/openid/handlers/OpenIdAuthenticationRequestHandler.php">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="0" selection-start="475" selection-end="475" vertical-scroll-proportion="-10.625">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/vendor/laravel/framework/src/Illuminate/Foundation/AliasLoader.php">
<provider selected="true" editor-type-id="text-editor">
<state line="65" column="0" selection-start="1247" selection-end="1247" vertical-scroll-proportion="3.3050847">
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -115,6 +115,8 @@ return array(
'Illuminate\Workbench\WorkbenchServiceProvider',
'openid\OpenIdServiceProvider',
'repositories\RepositoriesServiceProvider',
'auth\AuthenticationServiceProvider',
'services\ServicesProvider'
),
/*

View File

@ -15,7 +15,7 @@ return array(
|
*/
'driver' => 'eloquent',
'driver' => 'custom',
/*
|--------------------------------------------------------------------------

View File

@ -8,6 +8,7 @@
*/
use openid\IOpenIdProtocol;
use openid\XRDS\XRDSDocumentBuilder;
class DiscoveryController extends BaseController {
@ -22,8 +23,14 @@ class DiscoveryController extends BaseController {
* @return xrds document on response
*/
public function idp(){
$response = Response::make($this->openid_protocol->getXRDSDiscovery(), 200);
$response->header('Content-Type', "application/xrds+xml");
$value = Request::header('Content-Type');
if($value == XRDSDocumentBuilder::ContentType){
$response = Response::make($this->openid_protocol->getXRDSDiscovery(), 200);
$response->header('Content-Type', "application/xrds+xml");
}
else{
$response = View::make("home");
}
return $response;
}

View File

@ -1,8 +1,11 @@
<?php
use openid\XRDS\XRDSDocumentBuilder;
class HomeController extends BaseController {
public function index(){
return Redirect::action('DiscoveryController@idp');
$value = Request::header('Content-Type');
if($value == XRDSDocumentBuilder::ContentType)
return Redirect::action('DiscoveryController@idp');
return View::make("home");
}
}

View File

@ -8,25 +8,36 @@
*/
use openid\IOpenIdProtocol;
use \Illuminate\Support\Facades\Input;
use openid\OpenIdMessage;
use openid\strategies\OpenIdResponseStrategyFactoryMethod;
use openid\exceptions\InvalidOpenIdMessageException;
use openid\services\IMementoOpenIdRequestService;
class OpenIdProviderController extends BaseController{
class OpenIdProviderController extends BaseController
{
private $openid_protocol;
private $memento_service;
public function __construct(IOpenIdProtocol $openid_protocol){
public function __construct(IOpenIdProtocol $openid_protocol, IMementoOpenIdRequestService $memento_service)
{
$this->openid_protocol = $openid_protocol;
$this->memento_service = $memento_service;
}
public function op_endpoint(){
$msg = new OpenIdMessage(Input::all());
if($msg->IsValid()){
$this->openid_protocol->HandleOpenIdMessage($msg);
}
if( isset($msg["openid.return_to"])){
//Indirect Error Response
//sent response by
}
public function op_endpoint()
{
$msg = $this->memento_service->getCurrentRequest();
if (is_null($msg) || !$msg->IsValid())
throw new InvalidOpenIdMessageException("there is not a valid OpenIdMessage set on request");
//get response and manage it taking in consideration its type (direct or indirect)
$response = $this->openid_protocol->HandleOpenIdMessage($msg);
$reflector = new ReflectionClass($response);
if($reflector->isSubclassOf("openid\\responses\\OpenIdResponse")){
$strategy = OpenIdResponseStrategyFactoryMethod::buildStrategy($response);
return $strategy->handle($response);
}
return $response;
}
}

View File

@ -0,0 +1,62 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 3:21 PM
* To change this template use File | Settings | File Templates.
*/
use openid\services\IMementoOpenIdRequestService;
use openid\services\IAuthService;
use openid\requests\OpenIdAuthenticationRequest;
class UserController extends BaseController{
private $memento_service;
private $auth_service;
public function __construct(IMementoOpenIdRequestService $memento_service, IAuthService $auth_service){
$this->memento_service = $memento_service;
$this->auth_service = $auth_service;
//filters
$this->beforeFilter('csrf',array('only' => array('postLogin', 'postConsent')));
$this->beforeFilter('openid.save.request');
$this->beforeFilter('openid.needs.auth.request',array('only' => array('getLogin', 'getConsent')));
}
public function getLogin(){
return View::make("login");
}
public function postLogin(){
$data = Input::all();
// Build the validation constraint set.
$rules = array(
'username' => 'required',
'password' => 'required'
);
// Create a new validator instance.
$validator = Validator::make($data, $rules);
if ($validator->passes()) {
$username = Input::get("username");
$password = Input::get("password");
if($this->auth_service->Login($username,$password)){
return Redirect::to('/accounts/user/consent');
}
return Redirect::action('UserController@getLogin')->with('flash_notice', 'Authentication Failed!');
}
return Redirect::action('UserController@getLogin')->withErrors($validator);
}
public function getConsent(){
return View::make("consent")->with("realm","test");
}
public function postConsent(){
return Redirect::to('/accounts/openid/v2');
}
}

View File

@ -77,4 +77,28 @@ Route::filter('csrf', function()
{
throw new Illuminate\Session\TokenMismatchException;
}
});
});
use openid\services\IMementoOpenIdRequestService;
use openid\OpenIdMessage;
use openid\requests\OpenIdAuthenticationRequest;
use openid\exceptions\InvalidOpenIdMessageException;
Route::filter("openid.needs.auth.request",function(){
$memento_service = App::make("openid\\services\\IMementoOpenIdRequestService");
$openid_message = $memento_service->getCurrentRequest();
if($openid_message==null || !$openid_message->IsValid())
throw new InvalidOpenIdMessageException();
$auth_request = new OpenIdAuthenticationRequest($openid_message);
if(!$auth_request->IsValid())
throw new InvalidOpenIdMessageException();
});
Route::filter("openid.save.request",function(){
$memento_service = App::make("openid\\services\\IMementoOpenIdRequestService");
$memento_service->saveCurrentRequest();
});

View File

@ -0,0 +1,54 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 12:46 PM
* To change this template use File | Settings | File Templates.
*/
namespace auth;
use openid\services\IAuthService;
use \Auth;
use \Session;
class AuthService implements IAuthService {
/**
* @return mixed
*/
public function isUserLogged()
{
return Auth::check();
}
/**
* @return mixed
*/
public function getCurrentUser()
{
return Auth::user();
}
/**
* @param $username
* @param $password
* @return mixed
*/
public function Login($username, $password)
{
return Auth::attempt(array('username' => $username, 'password' => $password), true);
}
/**
* @return mixed
*/
public function isUserAuthorized()
{
return Session::get("authorized_state");
}
public function logout(){
Auth::logout();
}
}

View File

@ -0,0 +1,19 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 4:14 PM
* To change this template use File | Settings | File Templates.
*/
namespace auth;
use Illuminate\Support\ServiceProvider;
class AuthenticationServiceProvider extends ServiceProvider {
public function register()
{
$this->app->singleton('openid\\services\\IAuthService','auth\\AuthService');
}
}

View File

@ -0,0 +1,62 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 12:39 PM
* To change this template use File | Settings | File Templates.
*/
namespace auth;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\UserProviderInterface;
class CustomAuthProvider implements UserProviderInterface{
/**
* @var UserService
*/
private $userService;
public function __construct()
{
}
/**
* Retrieve a user by their unique identifier.
*
* @param mixed $identifier
* @return \Illuminate\Auth\UserInterface|null
*/
public function retrieveById($identifier)
{
return null;
}
/**
* Retrieve a user by the given credentials.
*
* @param array $credentials
* @return \Illuminate\Auth\UserInterface|null
*/
public function retrieveByCredentials(array $credentials)
{
$username = $credentials['username'];
$password = $credentials['password'];
return null;
}
/**
* Validate a user against the given credentials.
*
* @param \Illuminate\Auth\UserInterface $user
* @param array $credentials
* @return bool
*/
public function validateCredentials(UserInterface $user, array $credentials)
{
$username = $credentials['username'];
$password = $credentials['password'];
return null;
}
}

View File

@ -0,0 +1,35 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 12:40 PM
* To change this template use File | Settings | File Templates.
*/
namespace auth;
use Illuminate\Auth\UserInterface;
class CustomUser implements UserInterface{
/**
* Get the unique identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifier()
{
// TODO: Implement getAuthIdentifier() method.
}
/**
* Get the password for the user.
*
* @return string
*/
public function getAuthPassword()
{
// TODO: Implement getAuthPassword() method.
}
}

View File

@ -8,7 +8,7 @@
*/
namespace openid;
use openid\responses\OpenIdResponse;
interface IOpenIdProtocol {
/**
@ -30,7 +30,7 @@ interface IOpenIdProtocol {
/**
* @param OpenIdMessage $openIdMessage
* @return mixed
* @return responses\OpenIdResponse response
*/
public function HandleOpenIdMessage(OpenIdMessage $openIdMessage);
}

View File

@ -12,13 +12,14 @@ namespace openid;
class OpenIdMessage implements \ArrayAccess {
protected $valid_modes;
protected $container = array();
const OpenID2MessageType="http://specs.openid.net/auth/2.0";
const ModeType = "openid_mode";
const NSType = "openid_ns";
public function __construct(array $values) {
$this->valid_modes = array("checkid_setup","checkid_immediate","check_authentication","associate");
$this->container = $values;
}
@ -42,11 +43,15 @@ class OpenIdMessage implements \ArrayAccess {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
public function getMode(){
return $this->container[self::ModeType];
}
public function IsValid(){
if (isset($this->container["openid.ns"])
&& $this->container["openid.ns"] == self::OpenID2MessageType
&& isset($this->container["openid.mode"])
&& in_array($this->container["openid.mode"],$this->valid_modes)){
if (isset($this->container[self::NSType])
&& $this->container[self::NSType] == self::OpenID2MessageType
&& isset($this->container[self::ModeType])){
return true;
}
return false;

View File

@ -35,10 +35,12 @@ class OpenIdProtocol implements IOpenIdProtocol {
$this->server_configuration = $server_configuration;
//create chain of responsibility
$authService = \App::make("openid\\services\\IAuthService");
$mementoRequestService = \App::make("openid\\services\\IMementoOpenIdRequestService");
$auth_strategy = \App::make("openid\\handlers\\IOpenIdAuthenticationStrategy");
$this->request_handlers = new OpenIdAuthenticationRequestHandler(
new OpenIdSessionAssociationRequestHandler(
new OpenIdCheckAuthenticationRequestHandler(null)));
$successor = new OpenIdSessionAssociationRequestHandler(new OpenIdCheckAuthenticationRequestHandler(null));
$this->request_handlers = new OpenIdAuthenticationRequestHandler($authService,$mementoRequestService,$auth_strategy,$successor);
}
public function getXRDSDiscovery(){
@ -61,6 +63,6 @@ class OpenIdProtocol implements IOpenIdProtocol {
}
public function HandleOpenIdMessage(OpenIdMessage $openIdMessage){
$this->request_handlers->HandleMessage($openIdMessage);
return $this->request_handlers->HandleMessage($openIdMessage);
}
}

View File

@ -15,7 +15,7 @@ use Illuminate\Support\ServiceProvider;
* Register dependencies with IOC container for package openid
* @package openid
*/
class OpenIdServiceProvider extends ServiceProvider {
class OpenIdServiceProvider extends ServiceProvider {
public function register()
{

View File

@ -0,0 +1,20 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 10:36 AM
* To change this template use File | Settings | File Templates.
*/
namespace openid\exceptions;
use \Exception;
class InvalidKVFormat extends Exception{
public function __construct($message = "") {
$message = "InvalidKVFormat : ".$message;
parent::__construct($message, 0 , null);
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 1:13 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\exceptions;
use \Exception;
class InvalidOpenIdMessageException extends Exception{
public function __construct($message = "") {
$message = "InvalidOpenIdMessageException : ".$message;
parent::__construct($message, 0 , null);
}
}

View File

@ -0,0 +1,17 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 3:14 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\handlers;
use openid\requests\OpenIdAuthenticationRequest;
interface IOpenIdAuthenticationStrategy {
public function doLogin(OpenIdAuthenticationRequest $request);
public function doConsent(OpenIdAuthenticationRequest $request);
}

View File

@ -11,15 +11,55 @@ namespace openid\handlers;
use openid\OpenIdMessage;
use openid\requests\OpenIdAuthenticationRequest;
use openid\services\IAuthService;
use openid\services\IMementoOpenIdRequestService;
/**
* Class OpenIdAuthenticationRequestHandler
* @package openid\handlers
*/
class OpenIdAuthenticationRequestHandler extends OpenIdMessageHandler
{
private $authService;
private $mementoRequestService;
private $auth_strategy;
class OpenIdAuthenticationRequestHandler extends OpenIdMessageHandler{
protected function InternalHandle(OpenIdMessage $message){
public function __construct(IAuthService $authService,
IMementoOpenIdRequestService $mementoRequestService,
IOpenIdAuthenticationStrategy $auth_strategy, $successor)
{
parent::__construct($successor);
$this->authService = $authService;
$this->mementoRequestService = $mementoRequestService;
$this->auth_strategy = $auth_strategy;
}
protected function InternalHandle(OpenIdMessage $message)
{
$request = new OpenIdAuthenticationRequest($message);
//validate request?
if(!$this->authService->isUserLogged()){
//do login process
$this->mementoRequestService->saveCurrentRequest();
return $this->auth_strategy->doLogin($request);
}
else {
//user already logged
$currentUser = $this->authService->getCurrentUser();
if($this->authService->isUserAuthorized()){
// make assertion about identity
// factory response and return
}
else{
//do consent process
$this->mementoRequestService->saveCurrentRequest();
$this->auth_strategy->doConsent($request);
}
}
}
protected function CanHandle(OpenIdMessage $message)
{
// TODO: Implement CanHandle() method.
return OpenIdAuthenticationRequest::IsOpenIdAuthenticationRequest($message);
}
}

View File

@ -24,10 +24,11 @@ abstract class OpenIdMessageHandler {
public function HandleMessage(OpenIdMessage $message){
if($this->CanHandle($message)){
//handle request
return $this->InternalHandle($message);
}
else if(isset($this->successor) && !null($this->successor))
{
$this->successor->HandleMessage($message);
return $this->successor->HandleMessage($message);
}
throw new Exception("WTF?");
}

View File

@ -0,0 +1,63 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 12:18 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\requests;
use openid\requests\OpenIdRequest;
use openid\OpenIdMessage;
class OpenIdAuthenticationRequest extends OpenIdRequest{
const IdentifierSelectType = "http://specs.openid.net/auth/2.0/identifier_select";
const ImmediateMode = "checkid_immediate";
const SetupMode = "checkid_setup";
const ClaimedIdType = "openid_claimed_id";
const IdentityType = "openid_identity";
const AssocHandleType = "openid_assoc_handle";
const ReturnToType = "openid_return_to";
const RealmType = "openid_realm";
public static function IsOpenIdAuthenticationRequest(OpenIdMessage $message){
$mode = $message->getMode();
if($mode==self::ImmediateMode || $mode==self::SetupMode) return true;
return false;
}
public function getClaimedId(){
return isset($this->message[self::ClaimedIdType])?$this->message[self::ClaimedIdType]:null;
}
public function getIdentity(){
return isset($this->message[self::IdentityType])?$this->message[self::IdentityType]:null;
}
public function getAssocHandle(){
return isset($this->message[self::AssocHandleType])?$this->message[self::AssocHandleType]:null;
}
public function getReturnTo(){
return isset($this->message[self::ReturnToType])?$this->message[self::ReturnToType]:null;
}
public function getRealm(){
return isset($this->message[self::RealmType])?$this->message[self::RealmType]:null;
}
public function IsValid(){
$return_to = $this->getReturnTo();
$claimed_id = $this->getClaimedId();
$identity = $this->getIdentity();
$mode = $this->getMode();
//todo: validate url(format-regex) - white list /black list?
return !empty($return_to)
&& !empty($claimed_id) && $claimed_id==self::IdentifierSelectType
&& !empty($identity) && $identity==self::IdentifierSelectType
&& !empty($mode) && ($mode == self::ImmediateMode || $mode == self::SetupMode);
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 12:16 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\requests;
use openid\OpenIdMessage;
abstract class OpenIdRequest {
protected $message;
public function __construct(OpenIdMessage $message){
$this->message = $message;
}
public function getMode(){
return $this->message->getMode();
}
abstract public function IsValid();
}

View File

@ -0,0 +1,37 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 10:51 AM
* To change this template use File | Settings | File Templates.
*/
namespace openid\responses;
use openid\responses\OpenIdDirectResponse;
/**
* Class OpenIdDirectGenericErrorResponse
* implements 5.1.2.2. Error Responses
* @package openid\responses
*/
class OpenIdDirectGenericErrorResponse extends OpenIdDirectResponse {
/**
* @param $error : A human-readable message indicating the cause of the error.
* @param null $contact : (optional) Contact address for the administrator of the sever.
* The contact address may take any form, as it is intended to be
* displayed to a person.
* @param null $reference: (optional) A reference token, such as a support ticket number
* or a URL to a news blog, etc.
*/
public function __construct($error, $contact=null, $reference=null){
parent::__construct();
$this->setHttpCode(self::HttpErrorResponse);
$this["error"] = $error;
//opt values
if(!is_null($contact))
$this["contact"] = $contact;
if(!is_null($reference))
$this["reference"] = $reference;
}
}

View File

@ -0,0 +1,69 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 10:30 AM
* To change this template use File | Settings | File Templates.
*/
namespace openid\responses;
use openid\exceptions\InvalidKVFormat;
/**
* Class OpenIdDirectResponse
* Implementation of 5.1.2. Direct Response
* @package openid\responses
*/
class OpenIdDirectResponse extends OpenIdResponse {
const DirectResponseContentType ="text/plain";
public function __construct(){
// Successful Responses: A server receiving a valid request MUST send a
// response with an HTTP status code of 200.
parent::__construct(self::HttpOkResponse,self::DirectResponseContentType);
/*
* This particular value MUST be present for the response to be a valid OpenID 2.0
* response. Future versions of the specification may define different values in order
* to allow message recipients to properly interpret the request.
*/
$this["ns"]=self::OpenId2ResponseType;
}
/**
* Implementation of 4.1.1. Key-Value Form Encoding
* @return string
* @throws \openid\exceptions\InvalidKVFormat
*/
public function getContent()
{
$kv_format ="";
if ($this->container !== null) {
ksort($this->container);
foreach ($this->container as $key => $value) {
if (is_array($value)) {
list($key, $value) = array($value[0], $value[1]);
}
if (strpos($key, ':') !== false) {
throw new InvalidKVFormat("key ".$key." has invalid char (':')");
}
if (strpos($key, "\n") !== false) {
throw new InvalidKVFormat("key ".$key." has invalid char ('\\n')");
}
if (strpos($value, "\n") !== false) {
throw new InvalidKVFormat("value ".$value." has invalid char ('\\n')");
}
$kv_format .= "$key:$value\n";
}
}
return $kv_format;
}
public function getType()
{
return "direct";
}
}

View File

@ -0,0 +1,51 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 11:17 AM
* To change this template use File | Settings | File Templates.
*/
namespace openid\responses;
use openid\responses\OpenIdResponse;
class OpenIdIndirectResponse extends OpenIdResponse{
const IndirectResponseContentType ="application/x-www-form-urlencoded";
public function __construct(){
// Successful Responses: A server receiving a valid request MUST send a
// response with an HTTP status code of 200.
parent::__construct(self::HttpOkResponse,self::IndirectResponseContentType);
/*
* This particular value MUST be present for the response to be a valid OpenID 2.0
* response. Future versions of the specification may define different values in order
* to allow message recipients to properly interpret the request.
*/
$this["openid.ns"] = self::OpenId2ResponseType;
}
public function getContent()
{
$url_encoded_format ="";
if ($this->container !== null) {
ksort($this->container);
foreach ($this->container as $key => $value) {
if (is_array($value)) {
list($key, $value) = array($value[0], $value[1]);
}
$value=urlencode ($value);
$url_encoded_format .= "$key=$value&";
}
$url_encoded_format = rtrim($url_encoded_format,'&');
}
return $url_encoded_format;
}
public function getType()
{
return "indirect";
}
}

View File

@ -0,0 +1,42 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 10:25 AM
* To change this template use File | Settings | File Templates.
*/
namespace openid\responses;
use openid\OpenIdMessage;
abstract class OpenIdResponse extends OpenIdMessage {
const HttpOkResponse = 200;
const HttpErrorResponse = 400;
const OpenId2ResponseType = "http://specs.openid.net/auth/2.0";
protected $http_code;
protected $content_type;
public function __construct($http_code,$content_type){
$this->http_code = $http_code;
$this->content_type = $content_type;
}
abstract public function getContent();
public function getHttpCode(){
return $this->http_code;
}
protected function setHttpCode($http_code){
$this->http_code = $http_code;
}
public function getContentType(){
return $this->content_type;
}
abstract public function getType();
}

View File

@ -0,0 +1,37 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 4:39 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\services;
interface IAuthService {
/**
* @return mixed
*/
public function isUserLogged();
/**
* @return mixed
*/
public function getCurrentUser();
/**
* @param $username
* @param $password
* @return mixed
*/
public function Login($username,$password);
/**
* @return mixed
*/
public function isUserAuthorized();
public function logout();
}

View File

@ -0,0 +1,28 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/16/13
* Time: 10:20 AM
* To change this template use File | Settings | File Templates.
*/
namespace openid\services;
use openid\requests\OpenIdRequest;
use openid\OpenIdMessage;
interface IMementoOpenIdRequestService {
/**
* Save current OpenIdRequest till next request
* @return bool
*/
public function saveCurrentRequest();
/** Retrieve last OpenIdMessage
* @return OpenIdMessage;
*/
public function getCurrentRequest();
}

View File

@ -0,0 +1,16 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 2:34 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\strategies;
use openid\responses\OpenIdResponse;
interface IOpenIdResponseStrategy {
public function handle(OpenIdResponse $response);
}

View File

@ -0,0 +1,21 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 2:36 PM
* To change this template use File | Settings | File Templates.
*/
namespace openid\strategies;
use openid\responses\OpenIdResponse;
class OpenIdResponseStrategyFactoryMethod {
/**
* @param OpenIdResponse $response
* @return IOpenIdResponseStrategy
*/
public static function buildStrategy(OpenIdResponse $response){
return null;
}
}

View File

@ -13,5 +13,16 @@
Route::get('/', "HomeController@index");
Route::get('/discovery', "DiscoveryController@idp");
//op endpoint url
Route::post('/accounts/openid/v2','OpenIdProviderController@op_endpoint');
Route::get('/accounts/openid/v2','OpenIdProviderController@op_endpoint');
Route::get('/accounts/openid/v2','OpenIdProviderController@op_endpoint');
//user interaction
Route::get('/accounts/user/login',"UserController@getLogin");
Route::post('/accounts/user/login',"UserController@postLogin");
Route::get('/accounts/user/consent',"UserController@getConsent");
Route::post('/accounts/user/consent',"UserController@postConsent");

View File

@ -0,0 +1,26 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 4:32 PM
* To change this template use File | Settings | File Templates.
*/
namespace services;
use openid\handlers\IOpenIdAuthenticationStrategy;
use openid\requests\OpenIdAuthenticationRequest;
use \Redirect;
class AuthenticationStrategy implements IOpenIdAuthenticationStrategy{
public function doLogin(OpenIdAuthenticationRequest $request)
{
return Redirect::action('UserController@getLogin');
}
public function doConsent(OpenIdAuthenticationRequest $request)
{
return Redirect::action('UserController@getConsent');
}
}

View File

@ -0,0 +1,70 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 4:29 PM
* To change this template use File | Settings | File Templates.
*/
namespace services;
use openid\OpenIdMessage;
use openid\services\IMementoOpenIdRequestService;
use \Input;
use \Session;
class MementoRequestService implements IMementoOpenIdRequestService {
/**
* Save current openid message to temp storage for next request
* @return bool
*/
public function saveCurrentRequest()
{
$input = Input::all();
$openid_params = array();
foreach($input as $key=>$value){
if(stristr($key,"openid")){
array_push($openid_params,$key);
}
}
if(count($openid_params)>0){
Input::flashOnly($openid_params);
return true;
}
else{
$old_data = Input::old();
$openid_params = array();
foreach($old_data as $key=>$value){
if(stristr($key,"openid")){
array_push($openid_params,$key);
}
}
if(count($openid_params)>0){
Session::reflash();
return true;
}
}
return false;
}
public function getCurrentRequest()
{
$msg = new OpenIdMessage(Input::all());
if (!$msg->IsValid()) {
$msg = null;
$old_data = Input::old();
$openid_params = array();
foreach($old_data as $key=>$value){
if(stristr($key,"openid")){
$openid_params[$key]=$value;
}
}
if(count($openid_params)>0){
$msg = new OpenIdMessage($openid_params);
}
}
return $msg;
}
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Created by JetBrains PhpStorm.
* User: smarcet
* Date: 10/15/13
* Time: 4:30 PM
* To change this template use File | Settings | File Templates.
*/
namespace services;
use Illuminate\Support\ServiceProvider;
class ServicesProvider extends ServiceProvider {
public function register()
{
$this->app->singleton('openid\\services\\IMementoOpenIdRequestService','services\\MementoRequestService');
$this->app->singleton('openid\\handlers\\IOpenIdAuthenticationStrategy','services\\AuthenticationStrategy');
}
}

View File

@ -1,5 +1,6 @@
<?php
use openid\exceptions\InvalidOpenIdMessageException;
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
@ -48,11 +49,20 @@ Log::useDailyFiles(storage_path().'/logs/'.$logFile);
|
*/
App::error(function(Exception $exception, $code)
{
Log::error($exception);
});
App::error(function(openid\exceptions\InvalidOpenIdMessageException $exception, $code)
{
Log::error($exception);
return View::make('error')->with('error', $exception->getMessage());
});
/*
|--------------------------------------------------------------------------
| Maintenance Mode Handler

View File

@ -0,0 +1,12 @@
@extends('layout')
@section('content')
<div class="container">
{{ Form::open(array('url' => '/accounts/user/consent', 'method' => 'post')) }}
<label>
This Site {{ $realm }} is requesting permissions
</label>
{{ Form::submit('Ok') }}
{{ Form::submit('Cancel') }}
{{ Form::close() }}
</div>
@stop

View File

@ -0,0 +1,6 @@
@extends('layout')
@section('content')
<div class="error-msg">
{{{ $error }}}
</div>
@stop

7
app/views/home.blade.php Normal file
View File

@ -0,0 +1,7 @@
@extends('layout')
@section('content')
<h1>OpenstackId Idp</h1>
<div class="container">
<p>Welcome to OpenstackId Idp!!!</p>
</div>
@stop

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenstackId Idp</title>
</head>
<body>
@yield('content')
</body>
</html>

30
app/views/login.blade.php Normal file
View File

@ -0,0 +1,30 @@
@extends('layout')
@section('content')
<h1>Login</h1>
<div class="container">
{{ Form::open(array('url' => '/accounts/user/login', 'method' => 'post')) }}
<ul class="errors">
@foreach($errors->all() as $message)
<li>{{ $message }}</li>
@endforeach
</ul>
<!-- username field -->
<div>
{{ Form::label('username', 'user') }}
{{ Form::text('username') }}
</div>
<div>
{{ Form::label('password', 'password') }}
{{ Form::password('password') }}
</div>
<div>
{{ Form::label('remember', 'remember me') }}
{{ Form::checkbox('remember', '1', false) }}
</div>
{{ Form::submit('Login') }}
@if(Session::has('flash_notice'))
<div id="flash_notice">{{ Session::get('flash_notice') }}</div>
@endif
{{ Form::close() }}
</div>
@stop

View File

@ -60,6 +60,19 @@ $framework = $app['path.base'].'/vendor/laravel/framework/src';
require $framework.'/Illuminate/Foundation/start.php';
//custom authentication
use Illuminate\Auth\Guard;
use auth\CustomAuthProvider;
Auth::extend('custom', function($app) {
return new Guard(
new CustomAuthProvider(),
App::make('session.store')
);
});
/*
|--------------------------------------------------------------------------
| Return The Application

View File

@ -18,7 +18,8 @@
"app/tests/TestCase.php",
"app/libs",
"app/repositories",
"app/tests/mocks"
"app/tests/mocks",
"app/services"
]
},
"scripts": {