generated from cuioss/cui-java-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
359 changed files
with
7,899 additions
and
2,704 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 |
---|---|---|
@@ -1,18 +1,24 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>de.cuioss.portal.authentication</groupId> | ||
<artifactId>authentication</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>portal-authentication-api</artifactId> | ||
<name>Portal Authentication API</name> | ||
<description>Api for the different way of authentication within the portal</description> | ||
<properties> | ||
<maven.jar.plugin.automatic.module.name> | ||
de.cuioss.portal.authentication.api</maven.jar.plugin.automatic.module.name> | ||
</properties> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>de.cuioss.portal.authentication</groupId> | ||
<artifactId>authentication</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>portal-authentication-api</artifactId> | ||
<name>Portal Authentication API</name> | ||
<description>Api for the different way of authentication within the portal</description> | ||
<properties> | ||
<maven.jar.plugin.automatic.module.name> | ||
de.cuioss.portal.authentication.api</maven.jar.plugin.automatic.module.name> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>jakarta.inject</groupId> | ||
<artifactId>jakarta.inject-api</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
15 changes: 15 additions & 0 deletions
15
...thentication-api/src/main/java/de/cuioss/portal/authentication/AuthenticatedUserInfo.java
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
15 changes: 15 additions & 0 deletions
15
...n/portal-authentication-api/src/main/java/de/cuioss/portal/authentication/LoginEvent.java
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
15 changes: 15 additions & 0 deletions
15
...al-authentication-api/src/main/java/de/cuioss/portal/authentication/PortalLoginEvent.java
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
15 changes: 15 additions & 0 deletions
15
...n/portal-authentication-api/src/main/java/de/cuioss/portal/authentication/PortalUser.java
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
15 changes: 15 additions & 0 deletions
15
...-authentication-api/src/main/java/de/cuioss/portal/authentication/PortalUserEnricher.java
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
15 changes: 15 additions & 0 deletions
15
...tal-authentication-api/src/main/java/de/cuioss/portal/authentication/UserChangeEvent.java
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
97 changes: 56 additions & 41 deletions
97
...cation-api/src/main/java/de/cuioss/portal/authentication/facade/AuthenticationFacade.java
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 |
---|---|---|
@@ -1,41 +1,56 @@ | ||
package de.cuioss.portal.authentication.facade; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
import de.cuioss.portal.authentication.AuthenticatedUserInfo; | ||
|
||
/** | ||
* Basic interface for cui-portals authentication mechanism. This variant is | ||
* used by sso logins | ||
* | ||
* @author Matthias Walliczek | ||
* | ||
*/ | ||
public interface AuthenticationFacade { | ||
|
||
/** | ||
* Access the current {@link AuthenticatedUserInfo}. | ||
* | ||
* @param servletRequest The servlet request. | ||
* @return Returns <code>null</code> in case no authentication has taken place. | ||
* In case of a existing authentication a populated | ||
* {@link AuthenticatedUserInfo} instance is returned. | ||
*/ | ||
AuthenticatedUserInfo retrieveCurrentAuthenticationContext(HttpServletRequest servletRequest); | ||
|
||
/** | ||
* Logs out the currently authenticated user. | ||
* | ||
* @param servletRequest The current servlet request that triggered the logout. | ||
* @return Returns a boolean indicating whether the logout request was | ||
* successful. | ||
*/ | ||
boolean logout(HttpServletRequest servletRequest); | ||
|
||
/** | ||
* @return The {@link AuthenticationSource} identifying the Source this | ||
* {@link AuthenticationFacade} uses. | ||
*/ | ||
AuthenticationSource getAuthenticationSource(); | ||
|
||
} | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.cuioss.portal.authentication.facade; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
|
||
import de.cuioss.portal.authentication.AuthenticatedUserInfo; | ||
|
||
/** | ||
* Basic interface for cui-portals authentication mechanism. This variant is | ||
* used by sso logins | ||
* | ||
* @author Matthias Walliczek | ||
* | ||
*/ | ||
public interface AuthenticationFacade { | ||
|
||
/** | ||
* Access the current {@link AuthenticatedUserInfo}. | ||
* | ||
* @param servletRequest The servlet request. | ||
* @return Returns <code>null</code> in case no authentication has taken place. | ||
* In case of a existing authentication a populated | ||
* {@link AuthenticatedUserInfo} instance is returned. | ||
*/ | ||
AuthenticatedUserInfo retrieveCurrentAuthenticationContext(HttpServletRequest servletRequest); | ||
|
||
/** | ||
* Logs out the currently authenticated user. | ||
* | ||
* @param servletRequest The current servlet request that triggered the logout. | ||
* @return Returns a boolean indicating whether the logout request was | ||
* successful. | ||
*/ | ||
boolean logout(HttpServletRequest servletRequest); | ||
|
||
/** | ||
* @return The {@link AuthenticationSource} identifying the Source this | ||
* {@link AuthenticationFacade} uses. | ||
*/ | ||
AuthenticationSource getAuthenticationSource(); | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...ation-api/src/main/java/de/cuioss/portal/authentication/facade/AuthenticationResults.java
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
15 changes: 15 additions & 0 deletions
15
...cation-api/src/main/java/de/cuioss/portal/authentication/facade/AuthenticationSource.java
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
15 changes: 15 additions & 0 deletions
15
...on-api/src/main/java/de/cuioss/portal/authentication/facade/BaseAuthenticationFacade.java
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
15 changes: 15 additions & 0 deletions
15
...i/src/main/java/de/cuioss/portal/authentication/facade/FormBasedAuthenticationFacade.java
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
61 changes: 38 additions & 23 deletions
61
...-api/src/main/java/de/cuioss/portal/authentication/facade/PortalAuthenticationFacade.java
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 |
---|---|---|
@@ -1,23 +1,38 @@ | ||
package de.cuioss.portal.authentication.facade; | ||
|
||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import javax.inject.Qualifier; | ||
|
||
/** | ||
* Defines Instances of {@link AuthenticationFacade} | ||
* | ||
* @author Oliver Wolff | ||
*/ | ||
@Qualifier | ||
@Retention(RUNTIME) | ||
@Target({ TYPE, METHOD, FIELD, PARAMETER }) | ||
public @interface PortalAuthenticationFacade { | ||
} | ||
/* | ||
* Copyright 2023 the original author or authors. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* <p> | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.cuioss.portal.authentication.facade; | ||
|
||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import javax.inject.Qualifier; | ||
|
||
/** | ||
* Defines Instances of {@link AuthenticationFacade} | ||
* | ||
* @author Oliver Wolff | ||
*/ | ||
@Qualifier | ||
@Retention(RUNTIME) | ||
@Target({ TYPE, METHOD, FIELD, PARAMETER }) | ||
public @interface PortalAuthenticationFacade { | ||
} |
Oops, something went wrong.