forked from apereo/cas
-
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.
Merge branch 'master' into authn-sup-mfa
# Conflicts: # cas-server-core-authentication/src/test/java/org/jasig/cas/authentication/handler/support/SimpleTestUsernamePasswordAuthenticationHandler.java
- Loading branch information
1 parent
a9fcf6b
commit 37feb2e
Showing
58 changed files
with
705 additions
and
636 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
32 changes: 5 additions & 27 deletions
32
...thentication/src/main/java/org/jasig/cas/authentication/AuthenticationContextBuilder.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,47 +1,25 @@ | ||
package org.jasig.cas.authentication; | ||
|
||
/** | ||
* This is {@link AuthenticationContextBuilder}. Builds an authentication context, | ||
* and collects authentication events to form a line of history from which the primary | ||
* composed context can be gleaned. | ||
* This is {@link AuthenticationContextBuilder}. | ||
* | ||
* @author Misagh Moayyed | ||
* @since 4.2.0 | ||
*/ | ||
public interface AuthenticationContextBuilder { | ||
/** | ||
* Total number of active authentications in this context. | ||
* | ||
* @return total count of authentications | ||
*/ | ||
int size(); | ||
|
||
/** | ||
* Determines whether the context is empty. | ||
* A non-empty context must contain a primary authentication and principal. | ||
* | ||
* @return true if context is empty. | ||
*/ | ||
boolean isEmpty(); | ||
|
||
/** | ||
* Collect a new authenication event and store it. | ||
* Collect authentication context builder. | ||
* | ||
* @param authentication the new authentication event | ||
* @return the builder instance in a fluid manner | ||
* @throws AuthenticationException the authentication exception | ||
* @param authentication the authentication | ||
* @return the authentication context builder | ||
*/ | ||
AuthenticationContextBuilder collect(Authentication authentication) throws AuthenticationException; | ||
AuthenticationContextBuilder collect(final Authentication authentication); | ||
|
||
/** | ||
* Build authentication context. | ||
* | ||
* @return the authentication context | ||
*/ | ||
AuthenticationContext build(); | ||
|
||
/** | ||
* Clear. | ||
*/ | ||
void clear(); | ||
} |
33 changes: 33 additions & 0 deletions
33
...ntication/src/main/java/org/jasig/cas/authentication/AuthenticationObjectsRepository.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.jasig.cas.authentication; | ||
|
||
/** | ||
* This is {@link AuthenticationObjectsRepository}, that holds the authentication machinery objects. | ||
* This component is to be injected into others where access to authentication object is required, and | ||
* simply serves as a holder. | ||
* | ||
* @author Misagh Moayyed | ||
* @since 4.2.0 | ||
*/ | ||
public interface AuthenticationObjectsRepository { | ||
|
||
/** | ||
* Gets authentication transaction manager. | ||
* | ||
* @return the authentication transaction manager | ||
*/ | ||
AuthenticationTransactionManager getAuthenticationTransactionManager(); | ||
|
||
/** | ||
* Gets authentication transaction factory. | ||
* | ||
* @return the authentication transaction factory | ||
*/ | ||
AuthenticationTransactionFactory getAuthenticationTransactionFactory(); | ||
|
||
/** | ||
* Gets principal election strategy. | ||
* | ||
* @return the principal election strategy | ||
*/ | ||
PrincipalElectionStrategy getPrincipalElectionStrategy(); | ||
} |
19 changes: 19 additions & 0 deletions
19
...-authentication/src/main/java/org/jasig/cas/authentication/AuthenticationTransaction.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.jasig.cas.authentication; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* This is {@link AuthenticationTransaction}. | ||
* | ||
* @author Misagh Moayyed | ||
* @since 4.2.0 | ||
*/ | ||
public interface AuthenticationTransaction { | ||
|
||
/** | ||
* Gets credentials. | ||
* | ||
* @return the credentials | ||
*/ | ||
Collection<Credential> getCredentials(); | ||
} |
17 changes: 17 additions & 0 deletions
17
...tication/src/main/java/org/jasig/cas/authentication/AuthenticationTransactionFactory.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.jasig.cas.authentication; | ||
|
||
/** | ||
* This is {@link AuthenticationTransactionFactory}. | ||
* | ||
* @author Misagh Moayyed | ||
* @since 4.2.0 | ||
*/ | ||
public interface AuthenticationTransactionFactory { | ||
/** | ||
* Get authentication transaction. | ||
* | ||
* @param credentials the credentials | ||
* @return the authentication transaction | ||
*/ | ||
AuthenticationTransaction get(Credential... credentials); | ||
} |
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
43 changes: 43 additions & 0 deletions
43
...er-core-api-ticket/src/main/java/org/jasig/cas/ticket/registry/TicketRegistrySupport.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.jasig.cas.ticket.registry; | ||
|
||
|
||
import org.jasig.cas.authentication.Authentication; | ||
import org.jasig.cas.authentication.principal.Principal; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Helper strategy API to ease retrieving CAS' <code>Authentication</code> object and its associated components | ||
* from available CAS SSO String token called <i>Ticket Granting Ticket (TGT)</i>. | ||
* | ||
* @author Misagh Moayyed | ||
* @author Dmitriy Kopylenko | ||
* @since 4.2.0 | ||
*/ | ||
public interface TicketRegistrySupport { | ||
|
||
/** | ||
* Retrieve a valid Authentication object identified by the provided TGT SSO token. | ||
* @param ticketGrantingTicketId an SSO token identifying the requested Authentication | ||
* @return valid Authentication OR <b>NULL</b> if there is no valid SSO session present identified by the provided TGT id SSO token | ||
* @throws RuntimeException | ||
*/ | ||
Authentication getAuthenticationFrom(String ticketGrantingTicketId); | ||
|
||
/** | ||
* Retrieve a valid Principal object identified by the provided TGT SSO token. | ||
* @param ticketGrantingTicketId an SSO token identifying the requested authenticated Principal | ||
* @return valid Principal OR <b>NULL</b> if there is no valid SSO session present identified by the provided TGT id SSO token | ||
* @throws RuntimeException | ||
*/ | ||
Principal getAuthenticatedPrincipalFrom(String ticketGrantingTicketId); | ||
|
||
/** | ||
* Retrieve a valid Principal's map of attributes identified by the provided TGT SSO token. | ||
* @param ticketGrantingTicketId an SSO token identifying the requested authenticated Principal's attributes | ||
* @return valid Principal's attributes OR <b>NULL</b> if there is no valid SSO session | ||
* present identified by the provided TGT id SSO token | ||
* @throws RuntimeException | ||
*/ | ||
Map<String, Object> getPrincipalAttributesFrom(String ticketGrantingTicketId); | ||
} |
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
Oops, something went wrong.