Skip to content

Commit

Permalink
broke down api module to smaller modules
Browse files Browse the repository at this point in the history
  • Loading branch information
SavvasMisaghMoayyed committed Nov 23, 2015
1 parent 22fb861 commit d647975
Show file tree
Hide file tree
Showing 191 changed files with 351 additions and 253 deletions.
8 changes: 8 additions & 0 deletions cas-server-core-api-authentication/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

description = 'Apereo CAS Core Authentication APIs'
dependencies {
compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-protocol')
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jasig.cas.authentication;

import org.jasig.cas.MessageDescriptor;
import org.jasig.cas.authentication.principal.Principal;

import java.io.Serializable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jasig.cas;
package org.jasig.cas.authentication;

import java.io.Serializable;

Expand Down
10 changes: 10 additions & 0 deletions cas-server-core-api-logout/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

description = 'Apereo CAS Core Logout APIs'
dependencies {

compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-authentication')
compile project(':cas-server-core-api-ticket')
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.jasig.cas.logout;

import org.jasig.cas.authentication.principal.SingleLogoutService;

import java.io.Serializable;
import java.net.URL;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package org.jasig.cas.authentication.principal;
package org.jasig.cas.logout;

import org.jasig.cas.authentication.principal.WebApplicationService;

/**
* Define a service which support single logout.
Expand Down
8 changes: 8 additions & 0 deletions cas-server-core-api-monitor/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

description = 'Apereo CAS Core Monitor APIs'
dependencies {

compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
}

7 changes: 7 additions & 0 deletions cas-server-core-api-protocol/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

description = 'Apereo CAS Core Protocol APIs'
dependencies {
compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
}

9 changes: 9 additions & 0 deletions cas-server-core-api-services/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

description = 'Apereo CAS Core Services APIs'
dependencies {

compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-authentication')
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package org.jasig.cas.util.services;

import org.jasig.cas.services.RegisteredService;
package org.jasig.cas.services;

/**
* Defines how to encrypt data based on registered service's public key, etc.
Expand Down
9 changes: 9 additions & 0 deletions cas-server-core-api-ticket/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

description = 'Apereo CAS Core Ticket APIs'
dependencies {

compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-authentication')
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
public interface ServiceTicket extends Ticket {

/** Prefix generally applied to unique ids generated
* by org.jasig.cas.util.UniqueTicketIdGenerator.
* by org.jasig.cas.ticket.UniqueTicketIdGenerator.
**/
String PREFIX = "ST";

/** Proxy ticket prefix applied to unique ids
* generated by org.jasig.cas.util.UniqueTicketIdGenerator.
* generated by org.jasig.cas.ticket.UniqueTicketIdGenerator.
**/
String PROXY_TICKET_PREFIX = "PT";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jasig.cas.util;
package org.jasig.cas.ticket;

/**
* Interface that enables for pluggable unique ticket Ids strategies.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jasig.cas.monitor;
package org.jasig.cas.ticket.registry;

/**
* Describes important state information that may be optionally exposed by
Expand Down
8 changes: 8 additions & 0 deletions cas-server-core-api-util/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

description = 'Apereo CAS Core Utility APIs'
dependencies {
compile group: 'com.google.guava', name: 'guava', version:guavaVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jasig.cas.util;
package org.jasig.cas;

import javax.validation.constraints.NotNull;

Expand Down
9 changes: 9 additions & 0 deletions cas-server-core-api-validation/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

description = 'Apereo CAS Core Validation APIs'
dependencies {

compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-authentication')
}

10 changes: 10 additions & 0 deletions cas-server-core-api-web/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

description = 'Apereo CAS Core Web APIs'
dependencies {

compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-authentication')
compile project(':cas-server-core-api')
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package org.jasig.cas.services.web.view;

import org.jasig.cas.CasProtocolConstants;
package org.jasig.cas;

/**
* Constants interface to host fields
Expand Down
8 changes: 7 additions & 1 deletion cas-server-core-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@

description = 'Apereo CAS Core APIs'
dependencies {
compile group: 'org.apache.commons', name: 'commons-collections4', version:commonsCollectionsVersion
compile group: 'com.google.guava', name: 'guava', version:guavaVersion
compile group: 'org.apache.commons', name: 'commons-lang3', version:commonsLangVersion
compile group: 'joda-time', name: 'joda-time', version:jodaTimeVersion
compile project(':cas-server-core-api-protocol')
compile project(':cas-server-core-api-authentication')
compile project(':cas-server-core-api-services')
compile project(':cas-server-core-api-ticket')
compile project(':cas-server-core-api-logout')
compile project(':cas-server-core-api-validation')
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jasig.cas;

import org.apache.commons.collections4.Predicate;
import com.google.common.base.Predicate;
import org.jasig.cas.authentication.AuthenticationException;
import org.jasig.cas.authentication.Credential;
import org.jasig.cas.authentication.principal.Service;
Expand Down Expand Up @@ -83,7 +83,7 @@ <T extends Ticket> T getTicket(@NotNull String ticketId, @NotNull Class<? extend
* @return the tickets
* @since 4.1.0
*/
Collection<Ticket> getTickets(@NotNull Predicate predicate);
Collection<Ticket> getTickets(@NotNull Predicate<Ticket> predicate);

/**
* Grants a {@link org.jasig.cas.ticket.ServiceTicket} that may be used to access the given service.
Expand Down
51 changes: 25 additions & 26 deletions cas-server-core-audit/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@

description = 'Apereo CAS Core Audit'
dependencies {
compile project(':cas-server-core-api')
compile(group: 'org.jasig.inspektr', name: 'inspektr-audit', version:inspektrVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'validation-api')
exclude(module: 'aspectjrt')
}
compile(group: 'org.springframework.security', name: 'spring-security-core', version:springSecVersion) {
exclude(module: 'spring-core')
exclude(module: 'spring-beans')
exclude(module: 'spring-context')
exclude(module: 'spring-aop')
exclude(module: 'spring-expression')
exclude(module: 'spring-web')
}
compile project(':cas-server-core-util')
testCompile(group: 'org.hibernate', name: 'hibernate-validator', version:hibernateValidatorVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'jboss-logging')
}
testCompile project(':cas-server-core-logout')
testCompile project(':cas-server-core-monitor')
testCompile project(':cas-server-core-util')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(':cas-server-core')
testCompile project(path: ":cas-server-core", configuration: "tests")
compile project(':cas-server-core-api')
compile(group: 'org.jasig.inspektr', name: 'inspektr-audit', version: inspektrVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'validation-api')
exclude(module: 'aspectjrt')
}
compile(group: 'org.springframework.security', name: 'spring-security-core', version: springSecVersion) {
exclude(module: 'spring-core')
exclude(module: 'spring-beans')
exclude(module: 'spring-context')
exclude(module: 'spring-aop')
exclude(module: 'spring-expression')
exclude(module: 'spring-web')
}
compile project(':cas-server-core-util')
testCompile(group: 'org.hibernate', name: 'hibernate-validator', version: hibernateValidatorVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'jboss-logging')
}
testCompile project(':cas-server-core-logout')
testCompile project(':cas-server-core-monitor')
testCompile project(':cas-server-core-util')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(':cas-server-core')
testCompile project(path: ":cas-server-core", configuration: "tests")
}


79 changes: 40 additions & 39 deletions cas-server-core-authentication/build.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
description = 'Apereo CAS Core Authentication'
dependencies {
compile project(':cas-server-core-api')
compile(group: 'io.dropwizard.metrics', name: 'metrics-annotation', version:dropwizardMetricsVersion) {
exclude(module: 'slf4j-api')
}
compile project(':cas-server-core-util')
compile(group: 'org.jasig.inspektr', name: 'inspektr-audit', version:inspektrVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'validation-api')
exclude(module: 'aspectjrt')
}
compile(group: 'org.jasig.service.persondir', name: 'person-directory-impl', version:personDirectoryVersion) {
exclude(module: 'commons-logging')
exclude(module: 'slf4j-api')
exclude(module: 'commons-lang3')
exclude(module: 'commons-collections4')
exclude(module: 'spring-beans')
exclude(module: 'spring-context')
exclude(module: 'spring-core')
exclude(module: 'spring-tx')
exclude(module: 'ldaptive')
}
compile(group: 'org.springframework.webflow', name: 'spring-binding', version:springWebflowVersion) {
exclude(module: 'commons-logging')
exclude(module: 'spring-beans')
exclude(module: 'spring-context')
exclude(module: 'spring-core')
exclude(module: 'spring-expression')
exclude(module: 'spring-webmvc')
}
testCompile project(':cas-server-core-web')
testCompile(group: 'org.hibernate', name: 'hibernate-core', version:hibernateVersion) {
exclude(module: 'jboss-logging-annotations')
exclude(module: 'javassist')
}
testCompile(group: 'org.hibernate', name: 'hibernate-validator', version:hibernateValidatorVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'jboss-logging')
exclude(module: 'xml-apis')
}
compile project(':cas-server-core-api-services')
compile project(':cas-server-core-api-ticket')
compile(group: 'io.dropwizard.metrics', name: 'metrics-annotation', version: dropwizardMetricsVersion) {
exclude(module: 'slf4j-api')
}
compile project(':cas-server-core-util')
compile(group: 'org.jasig.inspektr', name: 'inspektr-audit', version: inspektrVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'validation-api')
exclude(module: 'aspectjrt')
}
compile(group: 'org.jasig.service.persondir', name: 'person-directory-impl', version: personDirectoryVersion) {
exclude(module: 'commons-logging')
exclude(module: 'slf4j-api')
exclude(module: 'commons-lang3')
exclude(module: 'commons-collections4')
exclude(module: 'spring-beans')
exclude(module: 'spring-context')
exclude(module: 'spring-core')
exclude(module: 'spring-tx')
exclude(module: 'ldaptive')
}
compile(group: 'org.springframework.webflow', name: 'spring-binding', version: springWebflowVersion) {
exclude(module: 'commons-logging')
exclude(module: 'spring-beans')
exclude(module: 'spring-context')
exclude(module: 'spring-core')
exclude(module: 'spring-expression')
exclude(module: 'spring-webmvc')
}
testCompile project(':cas-server-core-web')
testCompile(group: 'org.hibernate', name: 'hibernate-core', version: hibernateVersion) {
exclude(module: 'jboss-logging-annotations')
exclude(module: 'javassist')
}
testCompile(group: 'org.hibernate', name: 'hibernate-validator', version: hibernateValidatorVersion) {
exclude(module: 'slf4j-api')
exclude(module: 'jboss-logging')
exclude(module: 'xml-apis')
}
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jasig.cas.authentication;

import org.apache.commons.collections4.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.jasig.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -12,8 +11,10 @@
import javax.validation.constraints.NotNull;
import java.security.GeneralSecurityException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;

/**
* Handler that contains a list of valid users and passwords. Useful if there is
Expand All @@ -38,6 +39,7 @@ public class AcceptUsersAuthenticationHandler extends AbstractUsernamePasswordAu

/** The default separator in the file. */
private static final String DEFAULT_SEPARATOR = "::";
private static final Pattern USERS_PASSWORDS_SPLITTER_PATTERN = Pattern.compile(DEFAULT_SEPARATOR);

/** The list of users we will accept. */
private Map<String, String> users;
Expand All @@ -52,9 +54,9 @@ public class AcceptUsersAuthenticationHandler extends AbstractUsernamePasswordAu
public void init() {
if (StringUtils.isNotBlank(this.acceptedUsers) && this.users == null) {
final Set<String> usersPasswords = org.springframework.util.StringUtils.commaDelimitedListToSet(this.acceptedUsers);
final Map<String, String> parsedUsers = new HashedMap<>();
final Map<String, String> parsedUsers = new HashMap<>();
for (final String usersPassword : usersPasswords) {
final String[] splitArray = usersPassword.split(DEFAULT_SEPARATOR);
final String[] splitArray = USERS_PASSWORDS_SPLITTER_PATTERN.split(usersPassword);
parsedUsers.put(splitArray[0], splitArray[1]);
}
setUsers(parsedUsers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.jasig.cas.MessageDescriptor;
import org.jasig.cas.authentication.principal.Principal;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jasig.cas.authentication.handler.support;

import org.jasig.cas.MessageDescriptor;
import org.jasig.cas.authentication.MessageDescriptor;
import org.jasig.cas.authentication.AbstractAuthenticationHandler;
import org.jasig.cas.authentication.BasicCredentialMetaData;
import org.jasig.cas.authentication.Credential;
Expand Down
Loading

0 comments on commit d647975

Please sign in to comment.