Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
Doorcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guardians of the Kretschmar Elock System
Doorcode
Commits
cd483dd0
Commit
cd483dd0
authored
Apr 05, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert saml things back to the way before it was disabled
parent
a7f905f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
src/web/backend/src/UseCases/Users/Authenticate/Authenticate.php
.../backend/src/UseCases/Users/Authenticate/Authenticate.php
+0
-6
src/web/backend/tests/Unit/Source/UseCases/Users/Authenticate/SamlUseCaseTest.php
...it/Source/UseCases/Users/Authenticate/SamlUseCaseTest.php
+2
-2
src/web/backend/tests/Unit/Source/UseCases/Users/Authenticate/UseCaseBaseTest.php
...it/Source/UseCases/Users/Authenticate/UseCaseBaseTest.php
+1
-1
No files found.
src/web/backend/src/UseCases/Users/Authenticate/Authenticate.php
View file @
cd483dd0
...
...
@@ -78,21 +78,17 @@ class Authenticate implements AuthenticateUseCase
/**
* @inheritDoc
* @throws \Source\Exceptions\NotImplementedException
*/
public
function
handToSaml
(
array
$options
=
[]):
string
{
// throw new NotImplementedException();
return
$this
->
saml
->
login
(
$options
);
}
/**
* @inheritDoc
* @throws \Source\Exceptions\NotImplementedException
*/
public
function
handleSamlLogin
(
Presenter
$presenter
):
void
{
// throw new NotImplementedException();
$samlUser
=
$this
->
saml
->
handleLogin
();
if
(
!
$samlUser
)
{
...
...
@@ -139,11 +135,9 @@ class Authenticate implements AuthenticateUseCase
/**
* @inheritDoc
* @throws \Source\Exceptions\NotImplementedException
*/
public
function
samlLogout
(
?string
$token
):
string
{
// throw new NotImplementedException();
if
(
$token
)
{
$this
->
tokens
->
invalidateToken
(
$token
);
}
...
...
src/web/backend/tests/Unit/Source/UseCases/Users/Authenticate/SamlUseCaseTest
NotUsed
.php
→
src/web/backend/tests/Unit/Source/UseCases/Users/Authenticate/SamlUseCaseTest.php
View file @
cd483dd0
...
...
@@ -11,7 +11,7 @@ use Tests\Doubles\InMemoryUsersRepositoryStub;
use
Source\UseCases\Users\Authenticate\Authenticate
;
use
Source\UseCases\Users\Authenticate\UserCreationException
;
class
SamlUseCaseTest
NotUsed
extends
UseCaseBaseTest
class
SamlUseCaseTest
extends
UseCaseBaseTest
{
protected
const
VALID_EMAIL
=
'email'
;
...
...
@@ -137,7 +137,7 @@ class SamlUseCaseTestNotUsed extends UseCaseBaseTest
{
$samlUser
=
$this
->
createSamlUser
();
$users
=
new
InMemoryUsersRepositoryStub
();
$this
->
useCase
=
new
Authenticate
(
$users
,
$this
->
saml
,
$this
->
tokens
);
$this
->
useCase
=
new
Authenticate
(
$users
,
$this
->
tokens
,
$this
->
saml
);
$this
->
expectException
(
UserCreationException
::
class
);
$this
->
handleLoginTest
(
$samlUser
);
}
...
...
src/web/backend/tests/Unit/Source/UseCases/Users/Authenticate/UseCaseBaseTest.php
View file @
cd483dd0
...
...
@@ -59,7 +59,7 @@ abstract class UseCaseBaseTest extends TestCase
$this
->
users
=
new
InMemoryUsersRepository
();
$this
->
tokens
=
new
InMemoryTokensRepository
();
$this
->
saml
=
new
InMemorySamlRepository
(
$this
->
loginUrl
,
$this
->
logoutUrl
);
$this
->
useCase
=
new
Authenticate
(
$this
->
users
,
$this
->
tokens
);
$this
->
useCase
=
new
Authenticate
(
$this
->
users
,
$this
->
tokens
,
$this
->
saml
);
$this
->
presenter
=
new
PresenterStub
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment