Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
token-checker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
token-checker
Commits
e09c5070
Commit
e09c5070
authored
5 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-7092 adjust saml service registry
parent
5bd48398
Branches
Branches containing commit
No related tags found
1 merge request
!1
OZG-7092 Anpassung TokenChecker
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
token-checker-server/src/main/java/de/ozgcloud/token/saml/SamlServiceRegistry.java
+9
-17
9 additions, 17 deletions
...main/java/de/ozgcloud/token/saml/SamlServiceRegistry.java
with
9 additions
and
17 deletions
token-checker-server/src/main/java/de/ozgcloud/token/saml/SamlSe
ttings
Registry.java
→
token-checker-server/src/main/java/de/ozgcloud/token/saml/SamlSe
rvice
Registry.java
+
9
−
17
View file @
e09c5070
...
...
@@ -20,27 +20,19 @@
package
de.ozgcloud.token.saml
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Optional
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.Assert
;
import
lombok.Builder
;
import
lombok.Singular
;
@Service
public
class
SamlSettingsRegistry
{
private
final
Map
<
String
,
SamlSetting
>
samlSettings
=
new
HashMap
<>();
@Builder
public
class
SamlServiceRegistry
{
public
void
addSetting
(
String
idpEntityId
,
SamlSetting
samlSetting
)
{
samlSettings
.
put
(
idpEntityId
,
samlSetting
);
}
public
SamlSetting
getSetting
(
String
idpEntityId
)
{
var
samlSetting
=
samlSettings
.
get
(
idpEntityId
);
Assert
.
state
(
samlSetting
!=
null
,
"Saml2 Configuration for "
+
idpEntityId
+
" is empty. SamlSettingsRegistry not proper initialized or no SAML2 Identity Provider configured"
);
@Singular
private
final
Map
<
String
,
SamlTokenService
>
samlServices
;
return
samlSetting
;
public
Optional
<
SamlTokenService
>
getSetting
(
String
idpEntityId
)
{
return
Optional
.
ofNullable
(
samlServices
.
get
(
idpEntityId
));
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment