From 05d7e27fb447c79a3eaac4c81f8247bf48210817 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 1 Oct 2019 16:37:35 -0400 Subject: [PATCH 01/26] Update doc and improve style for pac4j's ORCiDClient --- .../org/pac4j/oauth/client/OrcidClient.java | 74 ++++++++++++------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java index 3e078579..84fad86e 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java @@ -16,33 +16,33 @@ package org.pac4j.oauth.client; import org.apache.http.HttpStatus; + import org.pac4j.core.context.WebContext; import org.pac4j.core.exception.HttpCommunicationException; import org.pac4j.oauth.client.exception.OAuthCredentialsException; import org.pac4j.oauth.profile.OAuthAttributesDefinitions; -import org.pac4j.oauth.profile.XmlHelper; import org.pac4j.oauth.profile.orcid.OrcidAttributesDefinition; import org.pac4j.oauth.profile.orcid.OrcidProfile; +import org.pac4j.oauth.profile.XmlHelper; + import org.scribe.builder.api.OrcidApi20; import org.scribe.exceptions.OAuthException; import org.scribe.model.OAuthConfig; +import org.scribe.model.ProxyOAuthRequest; +import org.scribe.model.Response; import org.scribe.model.SignatureType; import org.scribe.model.Token; -import org.scribe.oauth.ProxyOAuth20ServiceImpl; import org.scribe.tokens.OrcidToken; -import org.scribe.model.ProxyOAuthRequest; -import org.scribe.model.Response; - +import org.scribe.oauth.ProxyOAuth20ServiceImpl; /** - *

This class is the OAuth client to authenticate users in ORCiD.

- *

It returns a {@link org.pac4j.oauth.profile.orcid.OrcidProfile}.

- *

More information at http://support.orcid.org/knowledgebase/articles/175079-tutorial-retrieve-data-from-an-orcid-record-with

+ * The ORCiD Client. + * + * This class is the OAuth 2.0 client to authenticate users via ORCiD by authorization. * * @author Jens Tinglev * @author Michael Haselton * @author Longze Chen - * @see org.pac4j.oauth.profile.orcid.OrcidProfile * @since 1.7.1 */ public class OrcidClient extends BaseOAuth20Client { @@ -57,7 +57,7 @@ public class OrcidClient extends BaseOAuth20Client { protected Boolean member = Boolean.TRUE; /** - * Create an instance of `OrcidClient` with given `key` and `secret`. + * Instantiate a new {@link OrcidClient}. * * @param key the key * @param secret the secret @@ -69,7 +69,7 @@ public OrcidClient(final String key, final String secret) { } /** - * Create an instance of `OrcidClient`. + * Instantiate a new {@link OrcidClient}. */ public OrcidClient() { setTokenAsHeader(true); @@ -100,6 +100,11 @@ protected boolean hasBeenCancelled(final WebContext context) { /** * Get the oauth url to retrieve user profile. * + * This method overrides itself, and here are the customizations: + * + * 1. Replaces API 1.1 with API 2.0 + * 2. Add the option to use the free public API if {@link #member} is {@code false} + * * @param accessToken the access token * @return profile uri * @throws OAuthException if wrong token type @@ -107,8 +112,11 @@ protected boolean hasBeenCancelled(final WebContext context) { @Override protected String getProfileUrl(final Token accessToken) { if (accessToken instanceof OrcidToken) { - return String.format("https://%s.orcid.org/v2.0/%s/record", - (this.getMember() ? "api" : "pub"), ((OrcidToken) accessToken).getOrcid()); + return String.format( + "https://%s.orcid.org/v2.0/%s/record", + this.getMember() ? "api" : "pub", + ((OrcidToken) accessToken).getOrcid() + ); } else { throw new OAuthException("Token in getProfileUrl is not an OrcidToken"); } @@ -122,14 +130,7 @@ protected void internalInit() { super.internalInit(); this.service = new ProxyOAuth20ServiceImpl( new OrcidApi20(), - new OAuthConfig( - this.key, - this.secret, - this.callbackUrl, - SignatureType.Header, - this.getScope(), - null - ), + new OAuthConfig(this.key, this.secret, this.callbackUrl, SignatureType.Header, this.getScope(), null), this.connectTimeout, this.readTimeout, this.proxyHost, this.proxyPort, @@ -167,20 +168,26 @@ public void setMember(final Boolean member) { } /** - * Extract user profile. + * Extract the user profile from the profile response. + * + * This method replaces itself and here are the customizations: * - * @param body the body + * 1. Set the raw ORCiD ID as the profile ID + * 2. Build the profile using normalized attributes so they can be successfully released to OSF + * + * @param body the response body * @return the profile */ @Override protected OrcidProfile extractUserProfile(final String body) { + final OrcidProfile profile = new OrcidProfile(); profile.setId(XmlHelper.get(body, OrcidAttributesDefinition.ORCID)); + for(final String attribute : OAuthAttributesDefinitions.orcidDefinition.getAllAttributes()) { final String value = XmlHelper.get(body, attribute); switch (attribute) { case OrcidAttributesDefinition.NORMALIZED_FAMILY_NAME: - break; case OrcidAttributesDefinition.NORMALIZED_GIVEN_NAME: break; case OrcidAttributesDefinition.FAMILY_NAME: @@ -198,8 +205,9 @@ protected OrcidProfile extractUserProfile(final String body) { } /** - * Create a new `OrcidClient`. - * @return the new cient + * Create a new {@link OrcidClient}. + * + * @return the new client */ @Override protected OrcidClient newClient() { @@ -211,13 +219,23 @@ protected OrcidClient newClient() { /** * Make a request to get the data of the authenticated user for the provider. * + * This method overrides {@link BaseOAuthClient#sendRequestForData(Token, String)}. Here are the customizations: + * + * 1. Removed access token from requests since the public API doesn't require it. + * 3. Improved the way how log messages are built. + * 4. Use interface constants {@link HttpStatus#SC_OK} instead of number literals. + * * @param accessToken the access token * @param dataUrl url of the data * @return the user data response * @throws HttpCommunicationException if fails to retrieve data */ @Override - protected String sendRequestForData(final Token accessToken, final String dataUrl) { + protected String sendRequestForData( + final Token accessToken, + final String dataUrl + ) throws HttpCommunicationException { + logger.debug("accessToken : {} / dataUrl : {}", accessToken, dataUrl); final long t0 = System.currentTimeMillis(); final ProxyOAuthRequest request = createProxyRequest(dataUrl); @@ -225,7 +243,7 @@ protected String sendRequestForData(final Token accessToken, final String dataUr final int code = response.getCode(); final String body = response.getBody(); final long t1 = System.currentTimeMillis(); - logger.debug(String.format("Request took : {} ms for : {} ", (t1 - t0), dataUrl)); + logger.debug("Request took : {} ms for : {} ", (t1 - t0), dataUrl); logger.debug("response code : {} / response body : {}", code, body); if (code != HttpStatus.SC_OK) { logger.error("Failed to get data, code : {} / body : {}", code, body); From 3caa3b22132309156016b9ccf82c466c75e9fed3 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 1 Oct 2019 16:40:19 -0400 Subject: [PATCH 02/26] ORCiDClient now uses access token via header when making API calls --- .../src/main/java/org/pac4j/oauth/client/OrcidClient.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java index 84fad86e..d23eacfa 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java @@ -221,7 +221,8 @@ protected OrcidClient newClient() { * * This method overrides {@link BaseOAuthClient#sendRequestForData(Token, String)}. Here are the customizations: * - * 1. Removed access token from requests since the public API doesn't require it. + * 1. No longer appends the access token as a query parameter to the URL. + * 2. Always includes the access token using the "Authorization" header. * 3. Improved the way how log messages are built. * 4. Use interface constants {@link HttpStatus#SC_OK} instead of number literals. * @@ -239,6 +240,9 @@ protected String sendRequestForData( logger.debug("accessToken : {} / dataUrl : {}", accessToken, dataUrl); final long t0 = System.currentTimeMillis(); final ProxyOAuthRequest request = createProxyRequest(dataUrl); + if (accessToken != null) { + request.addHeader("Authorization", "Bearer " + accessToken.getToken()); + } final Response response = request.send(); final int code = response.getCode(); final String body = response.getBody(); From d5592728a177a2e5e15804637668f07a48fc7150 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 1 Oct 2019 16:44:51 -0400 Subject: [PATCH 03/26] Overlay client action and auth handlers in cas-server-support-pac4j The commit is just a copy-n-paste of the original classes as shown in the links below. Style fixes and funtionality updates will be in their own commits so that the diffs are more readable and relevant. * https://github.com/apereo/cas/blob/4.1.x/cas-server-support-pac4j/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java * https://github.com/apereo/cas/blob/4.1.x/cas-server-support-pac4j/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java * https://github.com/apereo/cas/blob/4.1.x/cas-server-support-pac4j/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java [skip ci] --- .../AbstractClientAuthenticationHandler.java | 122 +++++++++ .../support/ClientAuthenticationHandler.java | 85 ++++++ .../support/pac4j/web/flow/ClientAction.java | 245 ++++++++++++++++++ 3 files changed, 452 insertions(+) create mode 100644 cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java create mode 100644 cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java create mode 100644 cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java new file mode 100644 index 00000000..a8579feb --- /dev/null +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -0,0 +1,122 @@ +/* + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you 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 the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.pac4j.authentication.handler.support; + +import org.jasig.cas.authentication.Credential; +import org.jasig.cas.authentication.HandlerResult; +import org.jasig.cas.authentication.PreventedException; +import org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler; +import org.jasig.cas.authentication.principal.DefaultPrincipalFactory; +import org.jasig.cas.authentication.principal.PrincipalFactory; +import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; +import org.pac4j.core.client.Client; +import org.pac4j.core.client.Clients; +import org.pac4j.core.context.J2EContext; +import org.pac4j.core.context.WebContext; +import org.pac4j.core.credentials.Credentials; +import org.pac4j.core.profile.UserProfile; +import org.springframework.webflow.context.ExternalContextHolder; +import org.springframework.webflow.context.servlet.ServletExternalContext; + +import javax.security.auth.login.FailedLoginException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.validation.constraints.NotNull; +import java.security.GeneralSecurityException; + +/** + * Generic handler for delegated authentication: it uses the client credentials to get the user profile + * returned by the provider for an authenticated user. + * + * @author Jerome Leleu + * @since 4.1.0 + */ +@SuppressWarnings("unchecked") +public abstract class AbstractClientAuthenticationHandler extends AbstractPreAndPostProcessingAuthenticationHandler { + + /** Factory to create the principal type. **/ + @NotNull + protected PrincipalFactory principalFactory = new DefaultPrincipalFactory(); + + /** + * The clients for authentication. + */ + @NotNull + private final Clients clients; + + /** + * Define the clients. + * + * @param theClients The clients for authentication + */ + public AbstractClientAuthenticationHandler(final Clients theClients) { + this.clients = theClients; + } + + @Override + public final boolean supports(final Credential credential) { + return credential != null && ClientCredential.class.isAssignableFrom(credential.getClass()); + } + + @Override + protected HandlerResult doAuthentication(final Credential credential) throws GeneralSecurityException, PreventedException { + final ClientCredential clientCredentials = (ClientCredential) credential; + logger.debug("clientCredentials : {}", clientCredentials); + + final Credentials credentials = clientCredentials.getCredentials(); + final String clientName = credentials.getClientName(); + logger.debug("clientName : {}", clientName); + + // get client + final Client client = this.clients.findClient(clientName); + logger.debug("client : {}", client); + + // web context + final ServletExternalContext servletExternalContext = (ServletExternalContext) ExternalContextHolder.getExternalContext(); + final HttpServletRequest request = (HttpServletRequest) servletExternalContext.getNativeRequest(); + final HttpServletResponse response = (HttpServletResponse) servletExternalContext.getNativeResponse(); + final WebContext webContext = new J2EContext(request, response); + + // get user profile + final UserProfile userProfile = client.getUserProfile(credentials, webContext); + logger.debug("userProfile : {}", userProfile); + + if (userProfile != null) { + return createResult(clientCredentials, userProfile); + } + + throw new FailedLoginException("Provider did not produce a user profile for: " + clientCredentials); + } + + /** + * Build the handler result. + * + * @param credentials the provided credentials + * @param profile the retrieved user profile + * @return the built handler result + * @throws GeneralSecurityException On authentication failure. + * @throws PreventedException On the indeterminate case when authentication is prevented. + */ + protected abstract HandlerResult createResult(final ClientCredential credentials, final UserProfile profile) + throws GeneralSecurityException, PreventedException; + + public void setPrincipalFactory(final PrincipalFactory principalFactory) { + this.principalFactory = principalFactory; + } +} diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java new file mode 100644 index 00000000..c97b2e30 --- /dev/null +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java @@ -0,0 +1,85 @@ +/* + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you 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 the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.pac4j.authentication.handler.support; + +import org.apache.commons.lang3.StringUtils; +import org.jasig.cas.authentication.BasicCredentialMetaData; +import org.jasig.cas.authentication.DefaultHandlerResult; +import org.jasig.cas.authentication.HandlerResult; +import org.jasig.cas.authentication.PreventedException; +import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; +import org.pac4j.core.client.Clients; +import org.pac4j.core.profile.UserProfile; + +import javax.security.auth.login.FailedLoginException; +import java.security.GeneralSecurityException; + +/** + * Specialized handler which builds the authenticated user directly from the retrieved user profile. + * + * @author Jerome Leleu + * @since 3.5.0 + */ +public class ClientAuthenticationHandler extends AbstractClientAuthenticationHandler { + + /** + * Whether to use the typed identifier (by default) or just the identifier. + */ + private boolean typedIdUsed = true; + + /** + * Define the clients. + * + * @param theClients The clients for authentication + */ + public ClientAuthenticationHandler(final Clients theClients) { + super(theClients); + } + + /** + * {@inheritDoc} + */ + @Override + protected HandlerResult createResult(final ClientCredential credentials, final UserProfile profile) + throws GeneralSecurityException, PreventedException { + final String id; + if (typedIdUsed) { + id = profile.getTypedId(); + } else { + id = profile.getId(); + } + if (StringUtils.isNotBlank(id)) { + credentials.setUserProfile(profile); + credentials.setTypedIdUsed(typedIdUsed); + return new DefaultHandlerResult( + this, + new BasicCredentialMetaData(credentials), + this.principalFactory.createPrincipal(id, profile.getAttributes())); + } + throw new FailedLoginException("No identifier found for this user profile: " + profile); + } + + public boolean isTypedIdUsed() { + return typedIdUsed; + } + + public void setTypedIdUsed(final boolean typedIdUsed) { + this.typedIdUsed = typedIdUsed; + } +} diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java new file mode 100644 index 00000000..6c909790 --- /dev/null +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -0,0 +1,245 @@ +/* + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you 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 the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.pac4j.web.flow; + +import java.util.Set; + +import com.google.common.collect.ImmutableSet; +import org.apache.commons.lang3.StringUtils; +import org.jasig.cas.CentralAuthenticationService; +import org.jasig.cas.authentication.principal.Service; +import org.jasig.cas.authentication.principal.WebApplicationService; +import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; +import org.jasig.cas.ticket.TicketGrantingTicket; +import org.jasig.cas.web.support.WebUtils; +import org.pac4j.core.client.BaseClient; +import org.pac4j.core.client.Client; +import org.pac4j.core.client.Clients; +import org.pac4j.core.client.Mechanism; +import org.pac4j.core.context.J2EContext; +import org.pac4j.core.context.WebContext; +import org.pac4j.core.credentials.Credentials; +import org.pac4j.core.exception.RequiresHttpAction; +import org.pac4j.core.exception.TechnicalException; +import org.pac4j.core.profile.CommonProfile; +import org.pac4j.core.profile.ProfileHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.webflow.action.AbstractAction; +import org.springframework.webflow.context.ExternalContext; +import org.springframework.webflow.context.ExternalContextHolder; +import org.springframework.webflow.execution.Event; +import org.springframework.webflow.execution.RequestContext; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import javax.validation.constraints.NotNull; + +/** + * This class represents an action to put at the beginning of the webflow. + *

+ * Before any authentication, redirection urls are computed for the different clients defined as well as the theme, + * locale, method and service are saved into the web session.

+ * After authentication, appropriate information are expected on this callback url to finish the authentication + * process with the provider. + * @author Jerome Leleu + * @since 3.5.0 + */ +@SuppressWarnings({ "unchecked", "rawtypes" }) +public final class ClientAction extends AbstractAction { + /** + * Constant for the service parameter. + */ + public static final String SERVICE = "service"; + /** + * Constant for the theme parameter. + */ + public static final String THEME = "theme"; + /** + * Constant for the locale parameter. + */ + public static final String LOCALE = "locale"; + /** + * Constant for the method parameter. + */ + public static final String METHOD = "method"; + /** + * Supported protocols. + */ + private static final Set SUPPORTED_PROTOCOLS = ImmutableSet.of(Mechanism.CAS_PROTOCOL, Mechanism.OAUTH_PROTOCOL, + Mechanism.OPENID_PROTOCOL, Mechanism.SAML_PROTOCOL, Mechanism.OPENID_CONNECT_PROTOCOL); + + /** + * The logger. + */ + private final Logger logger = LoggerFactory.getLogger(ClientAction.class); + + /** + * The clients used for authentication. + */ + @NotNull + private final Clients clients; + + /** + * The service for CAS authentication. + */ + @NotNull + private final CentralAuthenticationService centralAuthenticationService; + + /** + * Build the action. + * + * @param theCentralAuthenticationService The service for CAS authentication + * @param theClients The clients for authentication + */ + public ClientAction(final CentralAuthenticationService theCentralAuthenticationService, + final Clients theClients) { + this.centralAuthenticationService = theCentralAuthenticationService; + this.clients = theClients; + ProfileHelper.setKeepRawData(true); + } + + /** + * {@inheritDoc} + */ + @Override + protected Event doExecute(final RequestContext context) throws Exception { + final HttpServletRequest request = WebUtils.getHttpServletRequest(context); + final HttpServletResponse response = WebUtils.getHttpServletResponse(context); + final HttpSession session = request.getSession(); + + // web context + final WebContext webContext = new J2EContext(request, response); + + // get client + final String clientName = request.getParameter(this.clients.getClientNameParameter()); + logger.debug("clientName: {}", clientName); + + // it's an authentication + if (StringUtils.isNotBlank(clientName)) { + // get client + final BaseClient client = + (BaseClient) this.clients + .findClient(clientName); + logger.debug("client: {}", client); + + // Only supported protocols + final Mechanism mechanism = client.getMechanism(); + if (!SUPPORTED_PROTOCOLS.contains(mechanism)) { + throw new TechnicalException("Only CAS, OAuth, OpenID and SAML protocols are supported: " + client); + } + + // get credentials + final Credentials credentials; + try { + credentials = client.getCredentials(webContext); + logger.debug("credentials: {}", credentials); + } catch (final RequiresHttpAction e) { + logger.debug("requires http action: {}", e); + response.flushBuffer(); + final ExternalContext externalContext = ExternalContextHolder.getExternalContext(); + externalContext.recordResponseComplete(); + return new Event(this, "stop"); + } + + // retrieve parameters from web session + final Service service = (Service) session.getAttribute(SERVICE); + context.getFlowScope().put(SERVICE, service); + logger.debug("retrieve service: {}", service); + if (service != null) { + request.setAttribute(SERVICE, service.getId()); + } + restoreRequestAttribute(request, session, THEME); + restoreRequestAttribute(request, session, LOCALE); + restoreRequestAttribute(request, session, METHOD); + + // credentials not null -> try to authenticate + if (credentials != null) { + final TicketGrantingTicket tgt = + this.centralAuthenticationService.createTicketGrantingTicket(new ClientCredential(credentials)); + WebUtils.putTicketGrantingTicketInScopes(context, tgt); + return success(); + } + } + + // no or aborted authentication : go to login page + prepareForLoginPage(context); + return error(); + } + + /** + * Prepare the data for the login page. + * + * @param context The current webflow context + */ + protected void prepareForLoginPage(final RequestContext context) { + final HttpServletRequest request = WebUtils.getHttpServletRequest(context); + final HttpServletResponse response = WebUtils.getHttpServletResponse(context); + final HttpSession session = request.getSession(); + + // web context + final WebContext webContext = new J2EContext(request, response); + + // save parameters in web session + final WebApplicationService service = WebUtils.getService(context); + logger.debug("save service: {}", service); + session.setAttribute(SERVICE, service); + saveRequestParameter(request, session, THEME); + saveRequestParameter(request, session, LOCALE); + saveRequestParameter(request, session, METHOD); + + // for all clients, generate redirection urls + for (final Client client : this.clients.findAllClients()) { + final String key = client.getName() + "Url"; + final BaseClient baseClient = (BaseClient) client; + final String redirectionUrl = baseClient.getRedirectionUrl(webContext); + logger.debug("{} -> {}", key, redirectionUrl); + context.getFlowScope().put(key, redirectionUrl); + } + } + + /** + * Restore an attribute in web session as an attribute in request. + * + * @param request The HTTP request + * @param session The HTTP session + * @param name The name of the parameter + */ + private void restoreRequestAttribute(final HttpServletRequest request, final HttpSession session, + final String name) { + final String value = (String) session.getAttribute(name); + request.setAttribute(name, value); + } + + /** + * Save a request parameter in the web session. + * + * @param request The HTTP request + * @param session The HTTP session + * @param name The name of the parameter + */ + private void saveRequestParameter(final HttpServletRequest request, final HttpSession session, + final String name) { + final String value = request.getParameter(name); + if (value != null) { + session.setAttribute(name, value); + } + } +} From 3893bc5819d36f7371cccd104e297e91ec5a054e Mon Sep 17 00:00:00 2001 From: longze chen Date: Wed, 2 Oct 2019 12:20:25 -0400 Subject: [PATCH 04/26] Update doc & style for client action and auth handlers for pac4j --- .../AbstractClientAuthenticationHandler.java | 66 +++++--- .../support/ClientAuthenticationHandler.java | 44 ++++-- .../support/pac4j/web/flow/ClientAction.java | 148 ++++++++++-------- 3 files changed, 154 insertions(+), 104 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java index a8579feb..55ac1bb7 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -25,82 +25,97 @@ import org.jasig.cas.authentication.principal.DefaultPrincipalFactory; import org.jasig.cas.authentication.principal.PrincipalFactory; import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; + import org.pac4j.core.client.Client; import org.pac4j.core.client.Clients; import org.pac4j.core.context.J2EContext; import org.pac4j.core.context.WebContext; import org.pac4j.core.credentials.Credentials; import org.pac4j.core.profile.UserProfile; + import org.springframework.webflow.context.ExternalContextHolder; import org.springframework.webflow.context.servlet.ServletExternalContext; +import java.security.GeneralSecurityException; + import javax.security.auth.login.FailedLoginException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotNull; -import java.security.GeneralSecurityException; /** - * Generic handler for delegated authentication: it uses the client credentials to get the user profile - * returned by the provider for an authenticated user. + * The Abstract Client Authentication Handler. + * + * This class is a generic handler for authentication delegated to an auth client, implementing the authentication + * method {@link AbstractPreAndPostProcessingAuthenticationHandler#doAuthentication(Credential)}. It uses the auth + * client and provides it with client credentials in order to get the user profile returned by the provider for an + * authenticated user. * * @author Jerome Leleu - * @since 4.1.0 + * @author Longze Chen + * @since 4.1.5 */ @SuppressWarnings("unchecked") public abstract class AbstractClientAuthenticationHandler extends AbstractPreAndPostProcessingAuthenticationHandler { - /** Factory to create the principal type. **/ + /** The factory to create the principal type. **/ @NotNull protected PrincipalFactory principalFactory = new DefaultPrincipalFactory(); - /** - * The clients for authentication. - */ + /** The clients for authentication. */ @NotNull private final Clients clients; /** - * Define the clients. + * Instantiate a new {@link AbstractClientAuthenticationHandler} and define the clients. * - * @param theClients The clients for authentication + * @param theClients the clients for authentication */ public AbstractClientAuthenticationHandler(final Clients theClients) { this.clients = theClients; } + /** + * {@inheritDoc} + **/ @Override public final boolean supports(final Credential credential) { return credential != null && ClientCredential.class.isAssignableFrom(credential.getClass()); } + /** + * {@inheritDoc} + **/ @Override - protected HandlerResult doAuthentication(final Credential credential) throws GeneralSecurityException, PreventedException { + protected HandlerResult doAuthentication( + final Credential credential + ) throws GeneralSecurityException, PreventedException { + + // Construct a specific client credential from a general credential final ClientCredential clientCredentials = (ClientCredential) credential; logger.debug("clientCredentials : {}", clientCredentials); + // Retrieve the client by the client name found in the client credential final Credentials credentials = clientCredentials.getCredentials(); final String clientName = credentials.getClientName(); logger.debug("clientName : {}", clientName); - - // get client final Client client = this.clients.findClient(clientName); logger.debug("client : {}", client); - // web context - final ServletExternalContext servletExternalContext = (ServletExternalContext) ExternalContextHolder.getExternalContext(); + // Create the web context + final ServletExternalContext servletExternalContext + = (ServletExternalContext) ExternalContextHolder.getExternalContext(); final HttpServletRequest request = (HttpServletRequest) servletExternalContext.getNativeRequest(); final HttpServletResponse response = (HttpServletResponse) servletExternalContext.getNativeResponse(); final WebContext webContext = new J2EContext(request, response); - // get user profile + // Retrieve user profile. If successful, create and return a handler result final UserProfile userProfile = client.getUserProfile(credentials, webContext); logger.debug("userProfile : {}", userProfile); - if (userProfile != null) { return createResult(clientCredentials, userProfile); } - + // Otherwise, throw an exception. throw new FailedLoginException("Provider did not produce a user profile for: " + clientCredentials); } @@ -110,12 +125,19 @@ protected HandlerResult doAuthentication(final Credential credential) throws Gen * @param credentials the provided credentials * @param profile the retrieved user profile * @return the built handler result - * @throws GeneralSecurityException On authentication failure. - * @throws PreventedException On the indeterminate case when authentication is prevented. + * @throws GeneralSecurityException on authentication failure + * @throws PreventedException on the indeterminate case when authentication is prevented */ - protected abstract HandlerResult createResult(final ClientCredential credentials, final UserProfile profile) - throws GeneralSecurityException, PreventedException; + protected abstract HandlerResult createResult( + final ClientCredential credentials, + final UserProfile profile + ) throws GeneralSecurityException, PreventedException; + /** + * Set the principal factory. + * + * @param principalFactory the principal factory + */ public void setPrincipalFactory(final PrincipalFactory principalFactory) { this.principalFactory = principalFactory; } diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java index c97b2e30..6078a996 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java @@ -19,34 +19,38 @@ package org.jasig.cas.support.pac4j.authentication.handler.support; import org.apache.commons.lang3.StringUtils; + import org.jasig.cas.authentication.BasicCredentialMetaData; import org.jasig.cas.authentication.DefaultHandlerResult; import org.jasig.cas.authentication.HandlerResult; import org.jasig.cas.authentication.PreventedException; import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; + import org.pac4j.core.client.Clients; import org.pac4j.core.profile.UserProfile; -import javax.security.auth.login.FailedLoginException; import java.security.GeneralSecurityException; +import javax.security.auth.login.FailedLoginException; + /** - * Specialized handler which builds the authenticated user directly from the retrieved user profile. + * The Client Authentication Handler. + * + * This class is a specialized handler which builds the authenticated user directly from the retrieved user profile. * * @author Jerome Leleu - * @since 3.5.0 + * @author Longze Chen + * @since 4.1.5 */ public class ClientAuthenticationHandler extends AbstractClientAuthenticationHandler { - /** - * Whether to use the typed identifier (by default) or just the identifier. - */ + /** Whether to use the typed identifier (default) or just the identifier. */ private boolean typedIdUsed = true; /** - * Define the clients. + * Instantiate a new {@link ClientAuthenticationHandler} and define the clients. * - * @param theClients The clients for authentication + * @param theClients the clients for authentication */ public ClientAuthenticationHandler(final Clients theClients) { super(theClients); @@ -56,14 +60,12 @@ public ClientAuthenticationHandler(final Clients theClients) { * {@inheritDoc} */ @Override - protected HandlerResult createResult(final ClientCredential credentials, final UserProfile profile) - throws GeneralSecurityException, PreventedException { - final String id; - if (typedIdUsed) { - id = profile.getTypedId(); - } else { - id = profile.getId(); - } + protected HandlerResult createResult( + final ClientCredential credentials, + final UserProfile profile + ) throws GeneralSecurityException, PreventedException { + + final String id = typedIdUsed ? profile.getTypedId() : profile.getId(); if (StringUtils.isNotBlank(id)) { credentials.setUserProfile(profile); credentials.setTypedIdUsed(typedIdUsed); @@ -75,10 +77,20 @@ protected HandlerResult createResult(final ClientCredential credentials, final U throw new FailedLoginException("No identifier found for this user profile: " + profile); } + /** + * Check if type ID is used. + * + * @return the type ID flag + */ public boolean isTypedIdUsed() { return typedIdUsed; } + /** + * Toggle the type ID flag on and off. + * + * @param typedIdUsed a boolean value to set the type ID flag + */ public void setTypedIdUsed(final boolean typedIdUsed) { this.typedIdUsed = typedIdUsed; } diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java index 6c909790..12365f27 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -21,13 +21,16 @@ import java.util.Set; import com.google.common.collect.ImmutableSet; + import org.apache.commons.lang3.StringUtils; -import org.jasig.cas.CentralAuthenticationService; + import org.jasig.cas.authentication.principal.Service; import org.jasig.cas.authentication.principal.WebApplicationService; +import org.jasig.cas.CentralAuthenticationService; import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; import org.jasig.cas.ticket.TicketGrantingTicket; import org.jasig.cas.web.support.WebUtils; + import org.pac4j.core.client.BaseClient; import org.pac4j.core.client.Client; import org.pac4j.core.client.Clients; @@ -39,8 +42,10 @@ import org.pac4j.core.exception.TechnicalException; import org.pac4j.core.profile.CommonProfile; import org.pac4j.core.profile.ProfileHelper; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import org.springframework.webflow.action.AbstractAction; import org.springframework.webflow.context.ExternalContext; import org.springframework.webflow.context.ExternalContextHolder; @@ -53,64 +58,64 @@ import javax.validation.constraints.NotNull; /** - * This class represents an action to put at the beginning of the webflow. - *

- * Before any authentication, redirection urls are computed for the different clients defined as well as the theme, - * locale, method and service are saved into the web session.

- * After authentication, appropriate information are expected on this callback url to finish the authentication - * process with the provider. + * The Client Action. + * + * This class takes care of the role of CAS who serves as an client of a given auth protocol. + * + * This class represents an action to put at the beginning of the web flow. Before any authentication, redirection + * urls are computed for the different clients defined as well as the theme, locale, method and service are saved + * into the web session. After authentication, appropriate information are expected on this callback url to finish + * the authentication process with the provider. + * * @author Jerome Leleu - * @since 3.5.0 + * @author Longze Chen + * @since 4.1.5 */ @SuppressWarnings({ "unchecked", "rawtypes" }) public final class ClientAction extends AbstractAction { - /** - * Constant for the service parameter. - */ + + /** Constant for the service parameter. */ public static final String SERVICE = "service"; - /** - * Constant for the theme parameter. - */ + + /** Constant for the theme parameter. */ public static final String THEME = "theme"; - /** - * Constant for the locale parameter. - */ + + /** Constant for the locale parameter. */ public static final String LOCALE = "locale"; - /** - * Constant for the method parameter. - */ + + /** Constant for the method parameter. */ public static final String METHOD = "method"; - /** - * Supported protocols. - */ - private static final Set SUPPORTED_PROTOCOLS = ImmutableSet.of(Mechanism.CAS_PROTOCOL, Mechanism.OAUTH_PROTOCOL, - Mechanism.OPENID_PROTOCOL, Mechanism.SAML_PROTOCOL, Mechanism.OPENID_CONNECT_PROTOCOL); - /** - * The logger. - */ + /** Supported protocols. */ + private static final Set SUPPORTED_PROTOCOLS = ImmutableSet.of( + Mechanism.CAS_PROTOCOL, + Mechanism.OAUTH_PROTOCOL, + Mechanism.OPENID_PROTOCOL, + Mechanism.SAML_PROTOCOL, + Mechanism.OPENID_CONNECT_PROTOCOL + ); + + /** The logger. */ private final Logger logger = LoggerFactory.getLogger(ClientAction.class); - /** - * The clients used for authentication. - */ + /** The clients used for authentication. */ @NotNull private final Clients clients; - /** - * The service for CAS authentication. - */ + /** The service for CAS authentication. */ @NotNull private final CentralAuthenticationService centralAuthenticationService; /** - * Build the action. + * Instantiate a new {@link ClientAction}. * - * @param theCentralAuthenticationService The service for CAS authentication - * @param theClients The clients for authentication + * @param theCentralAuthenticationService the service for CAS authentication + * @param theClients the clients for authentication */ - public ClientAction(final CentralAuthenticationService theCentralAuthenticationService, - final Clients theClients) { + public ClientAction( + final CentralAuthenticationService theCentralAuthenticationService, + final Clients theClients + ) { this.centralAuthenticationService = theCentralAuthenticationService; this.clients = theClients; ProfileHelper.setKeepRawData(true); @@ -121,45 +126,47 @@ public ClientAction(final CentralAuthenticationService theCentralAuthenticationS */ @Override protected Event doExecute(final RequestContext context) throws Exception { + final HttpServletRequest request = WebUtils.getHttpServletRequest(context); final HttpServletResponse response = WebUtils.getHttpServletResponse(context); final HttpSession session = request.getSession(); - // web context + // Create a new web context final WebContext webContext = new J2EContext(request, response); - // get client + // Get the client name final String clientName = request.getParameter(this.clients.getClientNameParameter()); logger.debug("clientName: {}", clientName); - // it's an authentication + // If `client_name` found in the request parameter, do the authentication / authorization (auth). if (StringUtils.isNotBlank(clientName)) { - // get client - final BaseClient client = - (BaseClient) this.clients - .findClient(clientName); + + // 1. Retrieve the client + final BaseClient client + = (BaseClient) this.clients.findClient(clientName); logger.debug("client: {}", client); - // Only supported protocols + // 2. Check supported protocols final Mechanism mechanism = client.getMechanism(); if (!SUPPORTED_PROTOCOLS.contains(mechanism)) { throw new TechnicalException("Only CAS, OAuth, OpenID and SAML protocols are supported: " + client); } - // get credentials + // 3. Retrieve credentials final Credentials credentials; try { credentials = client.getCredentials(webContext); logger.debug("credentials: {}", credentials); } catch (final RequiresHttpAction e) { - logger.debug("requires http action: {}", e); + // Abort auth if fails to get credentials + logger.debug("requires http action: {}", e.toString()); response.flushBuffer(); final ExternalContext externalContext = ExternalContextHolder.getExternalContext(); externalContext.recordResponseComplete(); return new Event(this, "stop"); } - // retrieve parameters from web session + // 4. Retrieve saved parameters from the web session final Service service = (Service) session.getAttribute(SERVICE); context.getFlowScope().put(SERVICE, service); logger.debug("retrieve service: {}", service); @@ -170,7 +177,7 @@ protected Event doExecute(final RequestContext context) throws Exception { restoreRequestAttribute(request, session, LOCALE); restoreRequestAttribute(request, session, METHOD); - // credentials not null -> try to authenticate + // 5. Attempt to authenticate if the credential is not null if (credentials != null) { final TicketGrantingTicket tgt = this.centralAuthenticationService.createTicketGrantingTicket(new ClientCredential(credentials)); @@ -179,7 +186,9 @@ protected Event doExecute(final RequestContext context) throws Exception { } } - // no or aborted authentication : go to login page + // If `client_name` is not in the request params - no auth, or if `credentials == null` - aborted auth, simply + // prepare the login context with clients info and then go to the original start point of the CAS login web + // flow: refer to "cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml" for detail. prepareForLoginPage(context); return error(); } @@ -187,17 +196,18 @@ protected Event doExecute(final RequestContext context) throws Exception { /** * Prepare the data for the login page. * - * @param context The current webflow context + * @param context the current web flow context */ protected void prepareForLoginPage(final RequestContext context) { + final HttpServletRequest request = WebUtils.getHttpServletRequest(context); final HttpServletResponse response = WebUtils.getHttpServletResponse(context); final HttpSession session = request.getSession(); - // web context + // Create a new web context. final WebContext webContext = new J2EContext(request, response); - // save parameters in web session + // Save service and other parameters in the web session. final WebApplicationService service = WebUtils.getService(context); logger.debug("save service: {}", service); session.setAttribute(SERVICE, service); @@ -205,7 +215,7 @@ protected void prepareForLoginPage(final RequestContext context) { saveRequestParameter(request, session, LOCALE); saveRequestParameter(request, session, METHOD); - // for all clients, generate redirection urls + // Generate redirection (login) URLs for all clients and store them in the flow scope of the web context. for (final Client client : this.clients.findAllClients()) { final String key = client.getName() + "Url"; final BaseClient baseClient = (BaseClient) client; @@ -218,12 +228,15 @@ protected void prepareForLoginPage(final RequestContext context) { /** * Restore an attribute in web session as an attribute in request. * - * @param request The HTTP request - * @param session The HTTP session - * @param name The name of the parameter + * @param request the HTTP request + * @param session the HTTP session + * @param name the name of the parameter */ - private void restoreRequestAttribute(final HttpServletRequest request, final HttpSession session, - final String name) { + private void restoreRequestAttribute( + final HttpServletRequest request, + final HttpSession session, + final String name + ) { final String value = (String) session.getAttribute(name); request.setAttribute(name, value); } @@ -231,12 +244,15 @@ private void restoreRequestAttribute(final HttpServletRequest request, final Htt /** * Save a request parameter in the web session. * - * @param request The HTTP request - * @param session The HTTP session - * @param name The name of the parameter + * @param request the HTTP request + * @param session the HTTP session + * @param name the name of the parameter */ - private void saveRequestParameter(final HttpServletRequest request, final HttpSession session, - final String name) { + private void saveRequestParameter( + final HttpServletRequest request, + final HttpSession session, + final String name + ) { final String value = request.getParameter(name); if (value != null) { session.setAttribute(name, value); From 8fafd71339fd30e4f4096b366f4d9ac2c867c274 Mon Sep 17 00:00:00 2001 From: longze chen Date: Wed, 2 Oct 2019 17:43:41 -0400 Subject: [PATCH 05/26] Create dedicated exceptions for pac4j delegated login failures In addition, the main auth exception handler has been updated so that each new exception can be redirected to its own event in the login web flow. --- .../exceptions/CasClientLoginException.java | 50 ++++++++++++++++++ .../exceptions/DelegatedLoginException.java | 51 +++++++++++++++++++ .../exceptions/OrcidClientLoginException.java | 50 ++++++++++++++++++ ...ameworkAuthenticationExceptionHandler.java | 10 ++++ 4 files changed, 161 insertions(+) create mode 100644 cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java create mode 100644 cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java create mode 100644 cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java new file mode 100644 index 00000000..9635b08a --- /dev/null +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java @@ -0,0 +1,50 @@ +/* + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you 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 the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.exceptions; + +/** + * The CAS Client Login Exception. + * + * This is the special login exception class for authentication failures during delegated client login via + * {@link org.jasig.cas.support.pac4j.web.flow.ClientAction} and {@link org.pac4j.cas.client.CasClient}. + * + * @author Longze Chen + * @since 4.1.5 + */ +public class CasClientLoginException extends DelegatedLoginException { + + /** Unique id for serialization. */ + private static final long serialVersionUID = -7180107167551919266L; + + /** + * Instantiate a new {@link CasClientLoginException} with no detail message. + */ + public CasClientLoginException() { + super(); + } + + /** + * Instantiate a new {@link CasClientLoginException} with the specified detail message. + * + * @param msg the detail message + */ + public CasClientLoginException(final String msg) { + super(msg); + } +} diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java new file mode 100644 index 00000000..e33eecf2 --- /dev/null +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java @@ -0,0 +1,51 @@ +/* + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you 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 the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.exceptions; + +import javax.security.auth.login.FailedLoginException; + +/** + * The Delegated Login Exception. + * + * This is a generic login exception for authentication via delegated client. + * + * @author Longze Chen + * @since 4.1.5 + */ +public class DelegatedLoginException extends FailedLoginException { + + /** Unique id for serialization. */ + private static final long serialVersionUID = 2120800337731452548L; + + /** + * Instantiate a new {@link DelegatedLoginException} with no detail message. + */ + public DelegatedLoginException() { + super(); + } + + /** + * Instantiate a new {@link DelegatedLoginException} with the specified detail message. + * + * @param msg the detail message + */ + public DelegatedLoginException(final String msg) { + super(msg); + } +} diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java new file mode 100644 index 00000000..ca0c5334 --- /dev/null +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java @@ -0,0 +1,50 @@ +/* + * Licensed to Apereo under one or more contributor license + * agreements. See the NOTICE file distributed with this work + * for additional information regarding copyright ownership. + * Apereo licenses this file to you 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 the following location: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.exceptions; + +/** + * The ORCiD Client Login Exception. + * + * This is the special login exception class for authentication failures during delegated client login via + * {@link org.jasig.cas.support.pac4j.web.flow.ClientAction} and {@link org.pac4j.oauth.client.OrcidClient}. + * + * @author Longze Chen + * @since 4.1.5 + */ +public class OrcidClientLoginException extends DelegatedLoginException { + + /** Unique id for serialization. */ + private static final long serialVersionUID = 2120800337731452548L; + + /** + * Instantiate a new {@link OrcidClientLoginException} with no detail message. + */ + public OrcidClientLoginException() { + super(); + } + + /** + * Instantiate a new {@link OrcidClientLoginException} with the specified detail message. + * + * @param msg the detail message + */ + public OrcidClientLoginException(final String msg) { + super(msg); + } +} diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java index edbdbc95..dd850307 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java @@ -23,6 +23,9 @@ import java.util.List; import java.util.Set; +import io.cos.cas.authentication.exceptions.CasClientLoginException; +import io.cos.cas.authentication.exceptions.DelegatedLoginException; +import io.cos.cas.authentication.exceptions.OrcidClientLoginException; import io.cos.cas.authentication.InvalidVerificationKeyException; import io.cos.cas.authentication.LoginNotAllowedException; import io.cos.cas.authentication.OneTimePasswordFailedLoginException; @@ -87,6 +90,13 @@ public class OpenScienceFrameworkAuthenticationExceptionHandler extends Authenti DEFAULT_ERROR_LIST.add(OneTimePasswordRequiredException.class); } + // Customized exceptions for delegated login + static { + DEFAULT_ERROR_LIST.add(DelegatedLoginException.class); + DEFAULT_ERROR_LIST.add(OrcidClientLoginException.class); + DEFAULT_ERROR_LIST.add(CasClientLoginException.class); + } + // Exceptions that should count against the login rate limiting static { THROTTLE_INCREASE_SET.add(FailedLoginException.class.getSimpleName()); // Wrong password From 5d056738384e5aa7bb9dc4ee35c5abbefec0a2ec Mon Sep 17 00:00:00 2001 From: longze chen Date: Wed, 2 Oct 2019 18:40:38 -0400 Subject: [PATCH 06/26] Update client auth handlers to throw delegated exceptions --- .../AbstractClientAuthenticationHandler.java | 54 +++++++++++++------ .../support/ClientAuthenticationHandler.java | 35 +++++------- 2 files changed, 51 insertions(+), 38 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java index 55ac1bb7..d45973c1 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -18,27 +18,32 @@ */ package org.jasig.cas.support.pac4j.authentication.handler.support; +import io.cos.cas.authentication.exceptions.CasClientLoginException; +import io.cos.cas.authentication.exceptions.DelegatedLoginException; +import io.cos.cas.authentication.exceptions.OrcidClientLoginException; + import org.jasig.cas.authentication.Credential; import org.jasig.cas.authentication.HandlerResult; -import org.jasig.cas.authentication.PreventedException; import org.jasig.cas.authentication.handler.support.AbstractPreAndPostProcessingAuthenticationHandler; import org.jasig.cas.authentication.principal.DefaultPrincipalFactory; import org.jasig.cas.authentication.principal.PrincipalFactory; import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; +import org.pac4j.cas.client.CasClient; import org.pac4j.core.client.Client; import org.pac4j.core.client.Clients; import org.pac4j.core.context.J2EContext; import org.pac4j.core.context.WebContext; import org.pac4j.core.credentials.Credentials; +import org.pac4j.core.exception.TechnicalException; import org.pac4j.core.profile.UserProfile; +import org.pac4j.oauth.client.OrcidClient; import org.springframework.webflow.context.ExternalContextHolder; import org.springframework.webflow.context.servlet.ServletExternalContext; import java.security.GeneralSecurityException; -import javax.security.auth.login.FailedLoginException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.constraints.NotNull; @@ -48,8 +53,8 @@ * * This class is a generic handler for authentication delegated to an auth client, implementing the authentication * method {@link AbstractPreAndPostProcessingAuthenticationHandler#doAuthentication(Credential)}. It uses the auth - * client and provides it with client credentials in order to get the user profile returned by the provider for an - * authenticated user. + * client and provides it with the client credentials in order to get the user profile returned by the provider for + * an authenticated user. * * @author Jerome Leleu * @author Longze Chen @@ -87,20 +92,25 @@ public final boolean supports(final Credential credential) { * {@inheritDoc} **/ @Override - protected HandlerResult doAuthentication( - final Credential credential - ) throws GeneralSecurityException, PreventedException { + protected HandlerResult doAuthentication(final Credential credential) throws GeneralSecurityException { // Construct a specific client credential from a general credential final ClientCredential clientCredentials = (ClientCredential) credential; logger.debug("clientCredentials : {}", clientCredentials); - // Retrieve the client by the client name found in the client credential + // Retrieve the client name found in the client credential final Credentials credentials = clientCredentials.getCredentials(); final String clientName = credentials.getClientName(); logger.debug("clientName : {}", clientName); - final Client client = this.clients.findClient(clientName); - logger.debug("client : {}", client); + + // Attempt to load the client from defined clients + final Client client; + try { + client = this.clients.findClient(clientName); + logger.debug("client : {}", client); + } catch (final TechnicalException e) { + throw new DelegatedLoginException("Invalid client: " + clientName); + } // Create the web context final ServletExternalContext servletExternalContext @@ -109,14 +119,25 @@ protected HandlerResult doAuthentication( final HttpServletResponse response = (HttpServletResponse) servletExternalContext.getNativeResponse(); final WebContext webContext = new J2EContext(request, response); - // Retrieve user profile. If successful, create and return a handler result - final UserProfile userProfile = client.getUserProfile(credentials, webContext); - logger.debug("userProfile : {}", userProfile); + // Retrieve the user profile + final UserProfile userProfile; + try { + userProfile = client.getUserProfile(credentials, webContext); + logger.debug("userProfile : {}", userProfile); + } catch (final TechnicalException e) { + if (OrcidClient.class.getSimpleName().equals(client.getName())) { + throw new OrcidClientLoginException(e.getMessage()); + } else if (CasClient.class.getSimpleName().equals(client.getName())) { + throw new CasClientLoginException(e.getMessage()); + } + throw new DelegatedLoginException(e.getMessage()); + } + + // If successful, create and return a handler result; otherwise, throw a delegated login exception. if (userProfile != null) { return createResult(clientCredentials, userProfile); } - // Otherwise, throw an exception. - throw new FailedLoginException("Provider did not produce a user profile for: " + clientCredentials); + throw new DelegatedLoginException("Provider did not produce a user profile for: " + clientCredentials); } /** @@ -126,12 +147,11 @@ protected HandlerResult doAuthentication( * @param profile the retrieved user profile * @return the built handler result * @throws GeneralSecurityException on authentication failure - * @throws PreventedException on the indeterminate case when authentication is prevented */ protected abstract HandlerResult createResult( final ClientCredential credentials, final UserProfile profile - ) throws GeneralSecurityException, PreventedException; + ) throws GeneralSecurityException; /** * Set the principal factory. diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java index 6078a996..faebf89c 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java @@ -18,12 +18,13 @@ */ package org.jasig.cas.support.pac4j.authentication.handler.support; +import io.cos.cas.authentication.exceptions.DelegatedLoginException; + import org.apache.commons.lang3.StringUtils; import org.jasig.cas.authentication.BasicCredentialMetaData; import org.jasig.cas.authentication.DefaultHandlerResult; import org.jasig.cas.authentication.HandlerResult; -import org.jasig.cas.authentication.PreventedException; import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; import org.pac4j.core.client.Clients; @@ -31,8 +32,6 @@ import java.security.GeneralSecurityException; -import javax.security.auth.login.FailedLoginException; - /** * The Client Authentication Handler. * @@ -63,34 +62,28 @@ public ClientAuthenticationHandler(final Clients theClients) { protected HandlerResult createResult( final ClientCredential credentials, final UserProfile profile - ) throws GeneralSecurityException, PreventedException { + ) throws GeneralSecurityException { final String id = typedIdUsed ? profile.getTypedId() : profile.getId(); if (StringUtils.isNotBlank(id)) { - credentials.setUserProfile(profile); - credentials.setTypedIdUsed(typedIdUsed); - return new DefaultHandlerResult( - this, - new BasicCredentialMetaData(credentials), - this.principalFactory.createPrincipal(id, profile.getAttributes())); + try { + credentials.setUserProfile(profile); + credentials.setTypedIdUsed(typedIdUsed); + return new DefaultHandlerResult( + this, + new BasicCredentialMetaData(credentials), + this.principalFactory.createPrincipal(id, profile.getAttributes())); + } catch (final Exception e) { + throw new DelegatedLoginException(e.getMessage()); + } } - throw new FailedLoginException("No identifier found for this user profile: " + profile); + throw new DelegatedLoginException("No identifier found for this user profile: " + profile); } - /** - * Check if type ID is used. - * - * @return the type ID flag - */ public boolean isTypedIdUsed() { return typedIdUsed; } - /** - * Toggle the type ID flag on and off. - * - * @param typedIdUsed a boolean value to set the type ID flag - */ public void setTypedIdUsed(final boolean typedIdUsed) { this.typedIdUsed = typedIdUsed; } From 261c6b796ec4476a6c5eca2a5e56bc9c479d91ca Mon Sep 17 00:00:00 2001 From: longze chen Date: Wed, 2 Oct 2019 18:54:52 -0400 Subject: [PATCH 07/26] Rewrite the client action and update spring config * Rewrote the client action so that delegated login exceptions can be handled gracefully by the main CAS auth exception handler * Updated login web flow spring config accordingly --- .../support/pac4j/web/flow/ClientAction.java | 66 ++++++++++++++----- .../WEB-INF/webflow/login/login-webflow.xml | 1 + 2 files changed, 49 insertions(+), 18 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java index 12365f27..40d2e376 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -18,12 +18,17 @@ */ package org.jasig.cas.support.pac4j.web.flow; +import java.util.LinkedHashMap; +import java.util.Map; import java.util.Set; import com.google.common.collect.ImmutableSet; +import io.cos.cas.authentication.exceptions.DelegatedLoginException; + import org.apache.commons.lang3.StringUtils; +import org.jasig.cas.authentication.AuthenticationException; import org.jasig.cas.authentication.principal.Service; import org.jasig.cas.authentication.principal.WebApplicationService; import org.jasig.cas.CentralAuthenticationService; @@ -49,6 +54,7 @@ import org.springframework.webflow.action.AbstractAction; import org.springframework.webflow.context.ExternalContext; import org.springframework.webflow.context.ExternalContextHolder; +import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.RequestContext; @@ -86,6 +92,9 @@ public final class ClientAction extends AbstractAction { /** Constant for the method parameter. */ public static final String METHOD = "method"; + /** Constant for the name of failed auth event. */ + private static final String AUTHENTICATION_FAILURE = "authenticationFailure"; + /** Supported protocols. */ private static final Set SUPPORTED_PROTOCOLS = ImmutableSet.of( Mechanism.CAS_PROTOCOL, @@ -138,34 +147,45 @@ protected Event doExecute(final RequestContext context) throws Exception { final String clientName = request.getParameter(this.clients.getClientNameParameter()); logger.debug("clientName: {}", clientName); - // If `client_name` found in the request parameter, do the authentication / authorization (auth). - if (StringUtils.isNotBlank(clientName)) { + // In order for the main CAS login web flow to handle exceptions from pac4j's delegated login, we must apply + // a try-n-catch block to the rest of the code. TODO: wrap the code inside the block with a method. + try { - // 1. Retrieve the client - final BaseClient client - = (BaseClient) this.clients.findClient(clientName); - logger.debug("client: {}", client); + // If `client_name` is not in the request params, this is not an authentication. Prepare the login context + // with clients info and go to the original start point of the CAS login web flow. + if (StringUtils.isBlank(clientName)) { + prepareForLoginPage(context); + return error(); + } + // If `client_name` found in the request parameter, this is an authentication. Verify the client and the + // protocol; retrieve credentials and session parameters; and attempt to authenticate. + // 1. Retrieve the client + final BaseClient client; + try { + client = (BaseClient) this.clients.findClient(clientName); + logger.debug("client: {}", client); + } catch (TechnicalException e) { + throw new DelegatedLoginException("Invalid client: " + clientName); + } // 2. Check supported protocols final Mechanism mechanism = client.getMechanism(); if (!SUPPORTED_PROTOCOLS.contains(mechanism)) { throw new TechnicalException("Only CAS, OAuth, OpenID and SAML protocols are supported: " + client); } - // 3. Retrieve credentials final Credentials credentials; try { credentials = client.getCredentials(webContext); logger.debug("credentials: {}", credentials); } catch (final RequiresHttpAction e) { - // Abort auth if fails to get credentials + // Requires HTTP action: client redirection logger.debug("requires http action: {}", e.toString()); response.flushBuffer(); final ExternalContext externalContext = ExternalContextHolder.getExternalContext(); externalContext.recordResponseComplete(); return new Event(this, "stop"); } - // 4. Retrieve saved parameters from the web session final Service service = (Service) session.getAttribute(SERVICE); context.getFlowScope().put(SERVICE, service); @@ -177,20 +197,30 @@ protected Event doExecute(final RequestContext context) throws Exception { restoreRequestAttribute(request, session, LOCALE); restoreRequestAttribute(request, session, METHOD); - // 5. Attempt to authenticate if the credential is not null if (credentials != null) { - final TicketGrantingTicket tgt = - this.centralAuthenticationService.createTicketGrantingTicket(new ClientCredential(credentials)); + // 5. Attempt to authenticate if the credential is not null. + final TicketGrantingTicket tgt = this.centralAuthenticationService + .createTicketGrantingTicket(new ClientCredential(credentials)); WebUtils.putTicketGrantingTicketInScopes(context, tgt); return success(); + } else { + // Otherwise, abort the authentication: prepare the login context with clients info and then go to the + // original start point of the CAS login web flow. + prepareForLoginPage(context); + return error(); } - } - // If `client_name` is not in the request params - no auth, or if `credentials == null` - aborted auth, simply - // prepare the login context with clients info and then go to the original start point of the CAS login web - // flow: refer to "cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml" for detail. - prepareForLoginPage(context); - return error(); + } catch (final Exception e) { + // If any exception occurs during the client authentication process, return the specialized event which + // will allow the CAS authentication exception handler to handle the exception gracefully. + final Map> failures = new LinkedHashMap<>(); + failures.put(e.getClass().getSimpleName(), e.getClass()); + return getEventFactorySupport().event( + this, + AUTHENTICATION_FAILURE, + new LocalAttributeMap<>("error", new AuthenticationException(failures)) + ); + } } /** diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml b/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml index 9e6cdcad..e964b868 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml +++ b/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml @@ -35,6 +35,7 @@ + From 7dda436cba00f184ef326e1b3ef9466484ccd840 Mon Sep 17 00:00:00 2001 From: longze chen Date: Thu, 3 Oct 2019 11:44:08 -0400 Subject: [PATCH 08/26] Throw client exceptions in client action instead of auth handlers The initial design was to throw client specific exceptions in the client auth handler. However, we discovered that exceptions ended up being caught and re-thrown as a generic CAS auth exception. To fix this issue, the throwing client exceptions job has been moved to the client action, which is the last step before the failures are handled by the primary auth exception handler. In addtion, created a new helper class that selects the correct exception class to throw / return based on the simple class name of the client. The class name is used instead of the client name since each CAS client has its own unique client name. --- .../AbstractClientAuthenticationHandler.java | 11 +---- .../support/pac4j/web/flow/ClientAction.java | 40 ++++++++++++++++--- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java index d45973c1..61cc48c9 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -18,9 +18,7 @@ */ package org.jasig.cas.support.pac4j.authentication.handler.support; -import io.cos.cas.authentication.exceptions.CasClientLoginException; import io.cos.cas.authentication.exceptions.DelegatedLoginException; -import io.cos.cas.authentication.exceptions.OrcidClientLoginException; import org.jasig.cas.authentication.Credential; import org.jasig.cas.authentication.HandlerResult; @@ -29,7 +27,6 @@ import org.jasig.cas.authentication.principal.PrincipalFactory; import org.jasig.cas.support.pac4j.authentication.principal.ClientCredential; -import org.pac4j.cas.client.CasClient; import org.pac4j.core.client.Client; import org.pac4j.core.client.Clients; import org.pac4j.core.context.J2EContext; @@ -37,7 +34,6 @@ import org.pac4j.core.credentials.Credentials; import org.pac4j.core.exception.TechnicalException; import org.pac4j.core.profile.UserProfile; -import org.pac4j.oauth.client.OrcidClient; import org.springframework.webflow.context.ExternalContextHolder; import org.springframework.webflow.context.servlet.ServletExternalContext; @@ -119,17 +115,12 @@ protected HandlerResult doAuthentication(final Credential credential) throws Gen final HttpServletResponse response = (HttpServletResponse) servletExternalContext.getNativeResponse(); final WebContext webContext = new J2EContext(request, response); - // Retrieve the user profile + // Attempt to retrieve the user profile final UserProfile userProfile; try { userProfile = client.getUserProfile(credentials, webContext); logger.debug("userProfile : {}", userProfile); } catch (final TechnicalException e) { - if (OrcidClient.class.getSimpleName().equals(client.getName())) { - throw new OrcidClientLoginException(e.getMessage()); - } else if (CasClient.class.getSimpleName().equals(client.getName())) { - throw new CasClientLoginException(e.getMessage()); - } throw new DelegatedLoginException(e.getMessage()); } diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java index 40d2e376..48511647 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -24,7 +24,9 @@ import com.google.common.collect.ImmutableSet; +import io.cos.cas.authentication.exceptions.CasClientLoginException; import io.cos.cas.authentication.exceptions.DelegatedLoginException; +import io.cos.cas.authentication.exceptions.OrcidClientLoginException; import org.apache.commons.lang3.StringUtils; @@ -36,6 +38,7 @@ import org.jasig.cas.ticket.TicketGrantingTicket; import org.jasig.cas.web.support.WebUtils; +import org.pac4j.cas.client.CasClient; import org.pac4j.core.client.BaseClient; import org.pac4j.core.client.Client; import org.pac4j.core.client.Clients; @@ -43,10 +46,12 @@ import org.pac4j.core.context.J2EContext; import org.pac4j.core.context.WebContext; import org.pac4j.core.credentials.Credentials; +import org.pac4j.core.exception.CredentialsException; import org.pac4j.core.exception.RequiresHttpAction; import org.pac4j.core.exception.TechnicalException; import org.pac4j.core.profile.CommonProfile; import org.pac4j.core.profile.ProfileHelper; +import org.pac4j.oauth.client.OrcidClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -165,7 +170,7 @@ protected Event doExecute(final RequestContext context) throws Exception { try { client = (BaseClient) this.clients.findClient(clientName); logger.debug("client: {}", client); - } catch (TechnicalException e) { + } catch (final TechnicalException e) { throw new DelegatedLoginException("Invalid client: " + clientName); } // 2. Check supported protocols @@ -185,6 +190,8 @@ protected Event doExecute(final RequestContext context) throws Exception { final ExternalContext externalContext = ExternalContextHolder.getExternalContext(); externalContext.recordResponseComplete(); return new Event(this, "stop"); + } catch (final CredentialsException e) { + throw createClientSpecificDelegatedLoginException(client.getClass().getSimpleName(), e); } // 4. Retrieve saved parameters from the web session final Service service = (Service) session.getAttribute(SERVICE); @@ -199,10 +206,14 @@ protected Event doExecute(final RequestContext context) throws Exception { if (credentials != null) { // 5. Attempt to authenticate if the credential is not null. - final TicketGrantingTicket tgt = this.centralAuthenticationService - .createTicketGrantingTicket(new ClientCredential(credentials)); - WebUtils.putTicketGrantingTicketInScopes(context, tgt); - return success(); + try { + final TicketGrantingTicket tgt = this.centralAuthenticationService + .createTicketGrantingTicket(new ClientCredential(credentials)); + WebUtils.putTicketGrantingTicketInScopes(context, tgt); + return success(); + } catch (final Exception e) { + throw createClientSpecificDelegatedLoginException(client.getClass().getSimpleName(), e); + } } else { // Otherwise, abort the authentication: prepare the login context with clients info and then go to the // original start point of the CAS login web flow. @@ -288,4 +299,23 @@ private void saveRequestParameter( session.setAttribute(name, value); } } + + /** + * Throw client specific exceptions for delegated authentication failures. + * + * @param clientClassSimpleName the simple name of the class of the client + * @param e the original exception + * @return a client specific exception + */ + private DelegatedLoginException createClientSpecificDelegatedLoginException( + final String clientClassSimpleName, + final Exception e + ) { + if (OrcidClient.class.getSimpleName().equals(clientClassSimpleName)) { + return new OrcidClientLoginException(e.getMessage()); + } else if (CasClient.class.getSimpleName().equals(clientClassSimpleName)) { + return new CasClientLoginException(e.getMessage()); + } + return new DelegatedLoginException(e.getMessage()); + } } From 7bd9d133c98f0950560641ed3948cb21e985f211 Mon Sep 17 00:00:00 2001 From: longze chen Date: Thu, 3 Oct 2019 13:06:21 -0400 Subject: [PATCH 09/26] Delegated login exceptions now have their own views 3 new pages with dedicated messages and spring config updated --- .../src/main/resources/messages.properties | 19 +++++++- .../default/ui/delegatedLoginCasErrorView.jsp | 44 +++++++++++++++++++ .../ui/delegatedLoginGenericErrorView.jsp | 44 +++++++++++++++++++ .../ui/delegatedLoginOrcidErrorView.jsp | 44 +++++++++++++++++++ .../WEB-INF/webflow/login/login-webflow.xml | 7 +++ 5 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp create mode 100644 cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp create mode 100644 cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp diff --git a/cas-server-webapp/src/main/resources/messages.properties b/cas-server-webapp/src/main/resources/messages.properties index c28d662f..a397a6d9 100644 --- a/cas-server-webapp/src/main/resources/messages.properties +++ b/cas-server-webapp/src/main/resources/messages.properties @@ -100,6 +100,23 @@ authenticationFailure.FailedLoginException=The email or password you entered is authenticationFailure.OneTimePasswordRequiredException= authenticationFailure.OneTimePasswordFailedLoginException=The passcode you entered is incorrect. authenticationFailure.UNKNOWN=Invalid credentials. +# Delegated login failure messages +screen.delegatedloginfailure.generic.header=Delegated Authentication Error +screen.delegatedloginfailure.generic.message=We can not complete your request at this time due to an unexpected error \ + during delegated login. Please go back to the OSF and try again later. \ + If the issue persists, please contact OSF Support \ + for help. +screen.delegatedloginfailure.cas.header=Institution Login Error +screen.delegatedloginfailure.cas.message=We can not complete your request at this time due to an unexpected error \ + during institution login. Please go back to the OSF and try again \ + later.

If the issue persists, please check with your institution first to verify that your account is \ + entitled to authenticate to OSF.

If you believe this should not happen, please contact \ + OSF Support for help. +screen.delegatedloginfailure.orcid.header=ORCiD Login Error +screen.delegatedloginfailure.orcid.message=We can not complete your request at this time due to an unexpected error \ + during ORCiD login. Please go back to the OSF and try again later. If \ + the issue persists, please contact OSF Support for \ + help. INVALID_REQUEST_PROXY='pgt' and 'targetService' parameters are both required INVALID_TICKET_SPEC=Ticket failed validation specification. Possible errors could include attempting to validate a Proxy Ticket via a Service Ticket validator, or not complying with the renew true request. @@ -166,7 +183,7 @@ screen.institution.login.select.error.message=You must select an institution. # Sign in through OSF screen.osf.login.message=Sign in with your OSF account to continue -screen.osf.login.message.error=Oops! Something went wrong +screen.osf.login.message.error=Oops! Something went wrong ... # Two-factor Authentication screen.2fa.login.heading=Two-factor authentication diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp new file mode 100644 index 00000000..448c24bb --- /dev/null +++ b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp @@ -0,0 +1,44 @@ +<%-- + + Licensed to Apereo under one or more contributor license + agreements. See the NOTICE file distributed with this work + for additional information regarding copyright ownership. + Apereo licenses this file to you 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 the following location: + + http://www.apache.org/licenses/LICENSE-2.0 + + 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. + +--%> + +<%-- Login exception page: invalid or unexpected user status --%> + + + + + + +
+

+

+
+ + + + + + + diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp new file mode 100644 index 00000000..43f9b7d5 --- /dev/null +++ b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp @@ -0,0 +1,44 @@ +<%-- + + Licensed to Apereo under one or more contributor license + agreements. See the NOTICE file distributed with this work + for additional information regarding copyright ownership. + Apereo licenses this file to you 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 the following location: + + http://www.apache.org/licenses/LICENSE-2.0 + + 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. + +--%> + +<%-- Login exception page: invalid or unexpected user status --%> + + + + + + +
+

+

+
+ + + + + + + diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp new file mode 100644 index 00000000..000cbcb1 --- /dev/null +++ b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp @@ -0,0 +1,44 @@ +<%-- + + Licensed to Apereo under one or more contributor license + agreements. See the NOTICE file distributed with this work + for additional information regarding copyright ownership. + Apereo licenses this file to you 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 the following location: + + http://www.apache.org/licenses/LICENSE-2.0 + + 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. + +--%> + +<%-- Login exception page: invalid or unexpected user status --%> + + + + + + +
+

+

+
+ + + + + + + diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml b/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml index e964b868..7b6ff8c8 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml +++ b/cas-server-webapp/src/main/webapp/WEB-INF/webflow/login/login-webflow.xml @@ -207,6 +207,10 @@ + + + + @@ -280,6 +284,9 @@ + + + From 5feacd3ac6031cf7946f3ec793f6500bac6aad48 Mon Sep 17 00:00:00 2001 From: longze chen Date: Thu, 3 Oct 2019 13:11:38 -0400 Subject: [PATCH 10/26] Slightly tweak the ORCiD login config (no effect) * Replace deprecated default scope with "/authenticate" * Revoke prefix "www." from the authorize url --- .../src/main/java/org/pac4j/oauth/client/OrcidClient.java | 2 +- .../src/main/java/org/scribe/builder/api/OrcidApi20.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java index d23eacfa..65846bf7 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java @@ -48,7 +48,7 @@ public class OrcidClient extends BaseOAuth20Client { /** The default scope. */ - protected static final String DEFAULT_SCOPE = "/orcid-profile/read-limited"; + protected static final String DEFAULT_SCOPE = "/authenticate"; /** The scope. */ protected String scope = DEFAULT_SCOPE; diff --git a/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java b/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java index 446f971e..83a98172 100644 --- a/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java +++ b/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java @@ -32,7 +32,7 @@ public class OrcidApi20 extends DefaultApi20 { /** The authorization url. */ - private static final String AUTH_URL = "https://www.orcid.org/oauth/authorize"; + private static final String AUTH_URL = "https://orcid.org/oauth/authorize"; /** The token exchange url. */ private static final String TOKEN_URL = "https://orcid.org/oauth/token"; From 71abc3913aa83f833bef7507271a322b984c0ca1 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 8 Oct 2019 16:15:43 -0400 Subject: [PATCH 11/26] Fix comments for delegated login exception pages --- .../WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp | 2 +- .../view/jsp/default/ui/delegatedLoginGenericErrorView.jsp | 2 +- .../view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp index 448c24bb..662ae2f8 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp +++ b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginCasErrorView.jsp @@ -19,7 +19,7 @@ --%> -<%-- Login exception page: invalid or unexpected user status --%> +<%-- Delegated login exception page: CAS client --%> diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp index 43f9b7d5..67d1b2cf 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp +++ b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginGenericErrorView.jsp @@ -19,7 +19,7 @@ --%> -<%-- Login exception page: invalid or unexpected user status --%> +<%-- Generic delegated login exception page --%> diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp index 000cbcb1..8b3147f9 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp +++ b/cas-server-webapp/src/main/webapp/WEB-INF/view/jsp/default/ui/delegatedLoginOrcidErrorView.jsp @@ -19,7 +19,7 @@ --%> -<%-- Login exception page: invalid or unexpected user status --%> +<%-- Delegated login exception page: ORCiD client --%> From 815f54e53d90c3635e2d39373a11353cf880c524 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 8 Oct 2019 16:27:01 -0400 Subject: [PATCH 12/26] Add ORCiD scope docs to JavaDoc comments and fix import order --- .../java/org/pac4j/oauth/client/OrcidClient.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java index 65846bf7..39bba132 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java @@ -32,8 +32,8 @@ import org.scribe.model.Response; import org.scribe.model.SignatureType; import org.scribe.model.Token; -import org.scribe.tokens.OrcidToken; import org.scribe.oauth.ProxyOAuth20ServiceImpl; +import org.scribe.tokens.OrcidToken; /** * The ORCiD Client. @@ -47,7 +47,18 @@ */ public class OrcidClient extends BaseOAuth20Client { - /** The default scope. */ + /** + * The default scope. + * + * OSF CAS uses the "/authenticate" scope for the purpose of authentication only. According to ORCiD API docs, this + * scope is used when the client system will collect the ORCID iD but does not need access to read-limited data or + * will use the ORCID system as an authentication provider. This scope is available on the Member or Public API. + * For more information about ORCiD scopes, refer to https://members.orcid.org/api/oauth/orcid-scopes. + * + * In addition, "pac4j" version of the ORCiD OAuth 2.0 client implementation must use the 3-legged OAuth and the + * "/authenticate" scope is such a 3-legged scope. For more information on 2-legged and 3-legged OAuth, refer to + * https://members.orcid.org/api/oauth/2legged-oauth and https://members.orcid.org/api/oauth/3legged-oauth. + */ protected static final String DEFAULT_SCOPE = "/authenticate"; /** The scope. */ From 47ca9b49ca2426b50b4ef0169a569887c98bb9a8 Mon Sep 17 00:00:00 2001 From: longze chen Date: Wed, 9 Oct 2019 14:11:36 -0400 Subject: [PATCH 13/26] Add error-level logs to client action and client auth handlers --- .../handler/support/AbstractClientAuthenticationHandler.java | 3 +++ .../handler/support/ClientAuthenticationHandler.java | 2 ++ .../org/jasig/cas/support/pac4j/web/flow/ClientAction.java | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java index 61cc48c9..62aa0aa4 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -105,6 +105,7 @@ protected HandlerResult doAuthentication(final Credential credential) throws Gen client = this.clients.findClient(clientName); logger.debug("client : {}", client); } catch (final TechnicalException e) { + logger.error("Invalid client: {}", clientName); throw new DelegatedLoginException("Invalid client: " + clientName); } @@ -121,6 +122,7 @@ protected HandlerResult doAuthentication(final Credential credential) throws Gen userProfile = client.getUserProfile(credentials, webContext); logger.debug("userProfile : {}", userProfile); } catch (final TechnicalException e) { + logger.error("Failed to retrieve user profile: client = {}, error = {}", clientName, e.getMessage()); throw new DelegatedLoginException(e.getMessage()); } @@ -128,6 +130,7 @@ protected HandlerResult doAuthentication(final Credential credential) throws Gen if (userProfile != null) { return createResult(clientCredentials, userProfile); } + logger.error("Provider did not produce a user profile: client = {}", clientName); throw new DelegatedLoginException("Provider did not produce a user profile for: " + clientCredentials); } diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java index faebf89c..dd3c8892 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java @@ -74,9 +74,11 @@ protected HandlerResult createResult( new BasicCredentialMetaData(credentials), this.principalFactory.createPrincipal(id, profile.getAttributes())); } catch (final Exception e) { + logger.error("Failed to create handler result for profile: id = {}, error = {}", id, e.getMessage()); throw new DelegatedLoginException(e.getMessage()); } } + logger.error("No identifier found for user profile"); throw new DelegatedLoginException("No identifier found for this user profile: " + profile); } diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java index 48511647..a8b3df79 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -171,11 +171,13 @@ protected Event doExecute(final RequestContext context) throws Exception { client = (BaseClient) this.clients.findClient(clientName); logger.debug("client: {}", client); } catch (final TechnicalException e) { + logger.error("Invalid client: {}", clientName); throw new DelegatedLoginException("Invalid client: " + clientName); } // 2. Check supported protocols final Mechanism mechanism = client.getMechanism(); if (!SUPPORTED_PROTOCOLS.contains(mechanism)) { + logger.error("Invalid mechanism: client = {}", clientName); throw new TechnicalException("Only CAS, OAuth, OpenID and SAML protocols are supported: " + client); } // 3. Retrieve credentials @@ -191,6 +193,7 @@ protected Event doExecute(final RequestContext context) throws Exception { externalContext.recordResponseComplete(); return new Event(this, "stop"); } catch (final CredentialsException e) { + logger.error("Failed to retrieve the credentials: client = {}", clientName); throw createClientSpecificDelegatedLoginException(client.getClass().getSimpleName(), e); } // 4. Retrieve saved parameters from the web session @@ -212,6 +215,7 @@ protected Event doExecute(final RequestContext context) throws Exception { WebUtils.putTicketGrantingTicketInScopes(context, tgt); return success(); } catch (final Exception e) { + logger.error("Failed to authenticate the credentials: client = {}", clientName); throw createClientSpecificDelegatedLoginException(client.getClass().getSimpleName(), e); } } else { @@ -226,6 +230,7 @@ protected Event doExecute(final RequestContext context) throws Exception { // will allow the CAS authentication exception handler to handle the exception gracefully. final Map> failures = new LinkedHashMap<>(); failures.put(e.getClass().getSimpleName(), e.getClass()); + logger.error("Client action failed unexpectedly: client = {}, error = {}", clientName, e.getMessage()); return getEventFactorySupport().event( this, AUTHENTICATION_FAILURE, From b41bc92cc835796ec398c400e021591191360dc4 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 5 Nov 2019 11:19:33 -0500 Subject: [PATCH 14/26] Update wordings used for delegation error pages --- .../src/main/resources/messages.properties | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/cas-server-webapp/src/main/resources/messages.properties b/cas-server-webapp/src/main/resources/messages.properties index a397a6d9..5fdba728 100644 --- a/cas-server-webapp/src/main/resources/messages.properties +++ b/cas-server-webapp/src/main/resources/messages.properties @@ -101,22 +101,19 @@ authenticationFailure.OneTimePasswordRequiredException= authenticationFailure.OneTimePasswordFailedLoginException=The passcode you entered is incorrect. authenticationFailure.UNKNOWN=Invalid credentials. # Delegated login failure messages -screen.delegatedloginfailure.generic.header=Delegated Authentication Error -screen.delegatedloginfailure.generic.message=We can not complete your request at this time due to an unexpected error \ - during delegated login. Please go back to the OSF and try again later. \ - If the issue persists, please contact OSF Support \ - for help. -screen.delegatedloginfailure.cas.header=Institution Login Error -screen.delegatedloginfailure.cas.message=We can not complete your request at this time due to an unexpected error \ - during institution login. Please go back to the OSF and try again \ - later.

If the issue persists, please check with your institution first to verify that your account is \ - entitled to authenticate to OSF.

If you believe this should not happen, please contact \ - OSF Support for help. -screen.delegatedloginfailure.orcid.header=ORCiD Login Error -screen.delegatedloginfailure.orcid.message=We can not complete your request at this time due to an unexpected error \ - during ORCiD login. Please go back to the OSF and try again later. If \ - the issue persists, please contact OSF Support for \ - help. +screen.delegatedloginfailure.generic.header=Delegated authentication error +screen.delegatedloginfailure.generic.message=Your request cannot be completed at this time. Please \ + return to OSF and try again later. If this issue persists, please \ + contact Support for help. +screen.delegatedloginfailure.cas.header=Institution login error +screen.delegatedloginfailure.cas.message=Your request cannot be completed at this time. Please \ + return to OSF and try again later.

If the issue persists, \ + check with your institution to verify your account is entitled to authenticate to OSF.

If you believe this \ + is in error, please contact Support for help. +screen.delegatedloginfailure.orcid.header=ORCID login error +screen.delegatedloginfailure.orcid.message=Your request cannot be completed at this time. Please \ + return to OSF and try again later. If this issue persists, please \ + contact Support for help. INVALID_REQUEST_PROXY='pgt' and 'targetService' parameters are both required INVALID_TICKET_SPEC=Ticket failed validation specification. Possible errors could include attempting to validate a Proxy Ticket via a Service Ticket validator, or not complying with the renew true request. From cc4330d446619d7db585ed829db03af399fd2007 Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 5 Nov 2019 11:47:04 -0500 Subject: [PATCH 15/26] Fix JavaDoc tags for non-COS packages in cas-server-support-osf --- .../handler/support/AbstractClientAuthenticationHandler.java | 2 +- .../handler/support/ClientAuthenticationHandler.java | 2 +- .../org/jasig/cas/support/pac4j/web/flow/ClientAction.java | 2 +- .../AbstractThrottledSubmissionHandlerInterceptorAdapter.java | 3 ++- .../src/main/java/org/pac4j/oauth/client/OrcidClient.java | 3 ++- .../pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java | 2 +- .../src/main/java/org/scribe/builder/api/OrcidApi20.java | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java index 62aa0aa4..e42fd264 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -54,7 +54,7 @@ * * @author Jerome Leleu * @author Longze Chen - * @since 4.1.5 + * @since 4.1.0 */ @SuppressWarnings("unchecked") public abstract class AbstractClientAuthenticationHandler extends AbstractPreAndPostProcessingAuthenticationHandler { diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java index dd3c8892..aa24dccb 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java @@ -39,7 +39,7 @@ * * @author Jerome Leleu * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public class ClientAuthenticationHandler extends AbstractClientAuthenticationHandler { diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java index a8b3df79..82eae6d6 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -80,7 +80,7 @@ * * @author Jerome Leleu * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ @SuppressWarnings({ "unchecked", "rawtypes" }) public final class ClientAction extends AbstractAction { diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java b/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java index 57492355..ac199a47 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java @@ -41,8 +41,9 @@ /** * Abstract implementation of the handler that has all of the logic. * + * @author Scott Battaglia * @author Longze Chen - * @since 4.1.5 + * @since 3.3.5 */ public abstract class AbstractThrottledSubmissionHandlerInterceptorAdapter extends HandlerInterceptorAdapter implements InitializingBean { diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java index 39bba132..e55cb447 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java @@ -43,7 +43,8 @@ * @author Jens Tinglev * @author Michael Haselton * @author Longze Chen - * @since 1.7.1 + * @see org.pac4j.oauth.profile.orcid.OrcidProfile + * @since 1.6.0 */ public class OrcidClient extends BaseOAuth20Client { diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java index 3567ecad..7b519fc4 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java @@ -24,7 +24,7 @@ * @author Jens Tinglev * @author Michael Haselton * @author Longze Chen - * @since 1.7.1 + * @since 1.6.0 */ public class OrcidAttributesDefinition extends OAuthAttributesDefinition { diff --git a/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java b/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java index 83a98172..20d1db50 100644 --- a/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java +++ b/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java @@ -27,7 +27,7 @@ * @author Jens Tinglev * @author Michael Haselton * @author Longze Chen - * @since 1.7.1 + * @since 1.6.0 */ public class OrcidApi20 extends DefaultApi20 { From 8cd2fd7d7cd73c7e63b0adac5cf7c44fbce2c79e Mon Sep 17 00:00:00 2001 From: longze chen Date: Tue, 5 Nov 2019 17:24:15 -0500 Subject: [PATCH 16/26] Add or update COS Apache 2.0 license to classes in io.cos.cas Classes created by developers at COS in the package io.cos.cas should have COS's own Apache 2.0 license header instead of a copy from Apereo (now) / Jasig (then). License headers are now fixed (or added if missing) and the copyright year is provided to indicate when the class is created. --- .../daos/OpenScienceFrameworkDao.java | 26 ++++++++----------- .../daos/OpenScienceFrameworkDaoImpl.java | 26 ++++++++----------- ...ScienceFrameworkAuthenticationHandler.java | 26 ++++++++----------- ...penScienceFrameworkInstitutionHandler.java | 26 ++++++++----------- ...ceFrameworkPersonalAccessTokenHandler.java | 26 ++++++++----------- .../OpenScienceFrameworkScopeHandler.java | 26 ++++++++----------- ...nScienceFrameworkApiOauth2Application.java | 26 ++++++++----------- ...FrameworkApiOauth2PersonalAccessToken.java | 26 ++++++++----------- .../OpenScienceFrameworkApiOauth2Scope.java | 26 ++++++++----------- ...enScienceFrameworkApiOauth2TokenScope.java | 26 ++++++++----------- ...enScienceFrameworkDjangoContentTypeId.java | 26 ++++++++----------- .../models/OpenScienceFrameworkEmail.java | 26 ++++++++----------- .../models/OpenScienceFrameworkGuid.java | 26 ++++++++----------- .../OpenScienceFrameworkInstitution.java | 26 ++++++++----------- ...enceFrameworkTimeBasedOneTimePassword.java | 26 ++++++++----------- .../models/OpenScienceFrameworkUser.java | 26 ++++++++----------- .../postgres/types/DelegationProtocol.java | 25 ++++++++---------- .../postgres/types/StringListUserType.java | 26 ++++++++----------- .../InvalidVerificationKeyException.java | 25 ++++++++---------- .../LoginNotAllowedException.java | 25 ++++++++---------- .../OneTimePasswordFailedLoginException.java | 25 ++++++++---------- .../OneTimePasswordRequiredException.java | 25 ++++++++---------- .../OpenScienceFrameworkCredential.java | 25 ++++++++---------- .../RemoteUserFailedLoginException.java | 25 ++++++++---------- .../ShouldNotHappenException.java | 25 ++++++++---------- .../exceptions/CasClientLoginException.java | 25 ++++++++---------- .../exceptions/DelegatedLoginException.java | 25 ++++++++---------- .../exceptions/OrcidClientLoginException.java | 25 ++++++++---------- ...teUserNonInteractiveCredentialsAction.java | 25 ++++++++---------- .../io/cos/cas/authentication/oath/Totp.java | 15 +++++++++++ .../cas/authentication/oath/TotpUtils.java | 15 +++++++++++ ...meworkAuthenticationMetaDataPopulator.java | 26 ++++++++----------- .../services/MergingServiceRegistryDao.java | 25 ++++++++---------- ...penScienceFrameworkServiceRegistryDao.java | 26 ++++++++----------- ...ameworkAuthenticationExceptionHandler.java | 25 ++++++++---------- ...ienceFrameworkInstitutionLoginHandler.java | 26 ++++++++----------- .../OpenScienceFrameworkLoginHandler.java | 26 ++++++++----------- ...cienceFrameworkTerminateSessionAction.java | 26 ++++++++----------- ...meworkTicketGrantingTicketCheckAction.java | 25 ++++++++---------- ...meworkCookieRetrievingCookieGenerator.java | 25 ++++++++---------- 40 files changed, 448 insertions(+), 554 deletions(-) diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDao.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDao.java index 1c987c68..71f147db 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDao.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDao.java @@ -1,22 +1,18 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.daos; import io.cos.cas.adaptors.postgres.models.OpenScienceFrameworkApiOauth2Application; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDaoImpl.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDaoImpl.java index b3e6b588..6437a13d 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDaoImpl.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/daos/OpenScienceFrameworkDaoImpl.java @@ -1,22 +1,18 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.daos; import io.cos.cas.adaptors.postgres.models.OpenScienceFrameworkApiOauth2Application; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkAuthenticationHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkAuthenticationHandler.java index ca51f8f2..f2b7469f 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkAuthenticationHandler.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.handlers; import java.nio.charset.StandardCharsets; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkInstitutionHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkInstitutionHandler.java index 7872f330..1f4bfed1 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkInstitutionHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkInstitutionHandler.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.handlers; import io.cos.cas.adaptors.postgres.daos.OpenScienceFrameworkDaoImpl; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkPersonalAccessTokenHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkPersonalAccessTokenHandler.java index 242decde..2a98cdf7 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkPersonalAccessTokenHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkPersonalAccessTokenHandler.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.handlers; import io.cos.cas.adaptors.postgres.daos.OpenScienceFrameworkDaoImpl; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkScopeHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkScopeHandler.java index 4eebc6f6..51be7e5b 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkScopeHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/handlers/OpenScienceFrameworkScopeHandler.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.handlers; import io.cos.cas.adaptors.postgres.daos.OpenScienceFrameworkDaoImpl; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Application.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Application.java index 9f7e03cd..06ff673f 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Application.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Application.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2PersonalAccessToken.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2PersonalAccessToken.java index b47c7c8e..e1cc1275 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2PersonalAccessToken.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2PersonalAccessToken.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Scope.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Scope.java index 8360c0af..b77695cb 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Scope.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2Scope.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2TokenScope.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2TokenScope.java index 467a666c..c1526363 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2TokenScope.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkApiOauth2TokenScope.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2018. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkDjangoContentTypeId.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkDjangoContentTypeId.java index be57e7b0..d73e4952 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkDjangoContentTypeId.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkDjangoContentTypeId.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkEmail.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkEmail.java index 0a1c265a..f6ca45fd 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkEmail.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkEmail.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2017. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkGuid.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkGuid.java index c80554de..9a107b01 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkGuid.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkGuid.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkInstitution.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkInstitution.java index f7e00c26..8b424864 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkInstitution.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkInstitution.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import io.cos.cas.adaptors.postgres.types.DelegationProtocol; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkTimeBasedOneTimePassword.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkTimeBasedOneTimePassword.java index d9c3aa9d..6e529e6f 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkTimeBasedOneTimePassword.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkTimeBasedOneTimePassword.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import org.apache.commons.codec.binary.Base32; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkUser.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkUser.java index c2824dd1..faceb683 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkUser.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/models/OpenScienceFrameworkUser.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.models; import javax.persistence.Column; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/DelegationProtocol.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/DelegationProtocol.java index 91af5a9d..97a8db37 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/DelegationProtocol.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/DelegationProtocol.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2017. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.types; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/StringListUserType.java b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/StringListUserType.java index 91d8ae7c..53aa7472 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/StringListUserType.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/adaptors/postgres/types/StringListUserType.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.adaptors.postgres.types; import org.hibernate.HibernateException; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/InvalidVerificationKeyException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/InvalidVerificationKeyException.java index 03782e50..a1bb7a67 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/InvalidVerificationKeyException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/InvalidVerificationKeyException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2018. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/LoginNotAllowedException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/LoginNotAllowedException.java index d48480c1..2add2e69 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/LoginNotAllowedException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/LoginNotAllowedException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordFailedLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordFailedLoginException.java index 13f9405d..1f492ae7 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordFailedLoginException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordFailedLoginException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordRequiredException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordRequiredException.java index 621cf464..1d72d4e4 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordRequiredException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OneTimePasswordRequiredException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OpenScienceFrameworkCredential.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OpenScienceFrameworkCredential.java index 0b0fa4c6..9e1fcb01 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OpenScienceFrameworkCredential.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/OpenScienceFrameworkCredential.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/RemoteUserFailedLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/RemoteUserFailedLoginException.java index 2bd6cee8..333ed340 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/RemoteUserFailedLoginException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/RemoteUserFailedLoginException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/ShouldNotHappenException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/ShouldNotHappenException.java index adf979c7..1aae9e46 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/ShouldNotHappenException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/ShouldNotHappenException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java index 9635b08a..7dda9ae8 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/CasClientLoginException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2019. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.exceptions; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java index e33eecf2..ce2238be 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/DelegatedLoginException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2019. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.exceptions; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java index ca0c5334..73ca6e15 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/exceptions/OrcidClientLoginException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2019. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.exceptions; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/handler/support/OpenScienceFrameworkPrincipalFromRequestRemoteUserNonInteractiveCredentialsAction.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/handler/support/OpenScienceFrameworkPrincipalFromRequestRemoteUserNonInteractiveCredentialsAction.java index 21c8dded..3613eb37 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/handler/support/OpenScienceFrameworkPrincipalFromRequestRemoteUserNonInteractiveCredentialsAction.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/handler/support/OpenScienceFrameworkPrincipalFromRequestRemoteUserNonInteractiveCredentialsAction.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.handler.support; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/Totp.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/Totp.java index 4059da28..8db02a46 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/Totp.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/Totp.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2015. Center for Open Science + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.oath; import javax.crypto.Mac; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/TotpUtils.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/TotpUtils.java index 75061ebc..3c4ab2cb 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/TotpUtils.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/oath/TotpUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2015. Center for Open Science + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.oath; import org.apache.commons.codec.binary.Base32; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/principal/OpenScienceFrameworkAuthenticationMetaDataPopulator.java b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/principal/OpenScienceFrameworkAuthenticationMetaDataPopulator.java index c60782ea..ed58a335 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/authentication/principal/OpenScienceFrameworkAuthenticationMetaDataPopulator.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/authentication/principal/OpenScienceFrameworkAuthenticationMetaDataPopulator.java @@ -1,22 +1,18 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.authentication.principal; import io.cos.cas.authentication.OpenScienceFrameworkCredential; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/services/MergingServiceRegistryDao.java b/cas-server-support-osf/src/main/java/io/cos/cas/services/MergingServiceRegistryDao.java index 4b8f2db3..15ad97e3 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/services/MergingServiceRegistryDao.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/services/MergingServiceRegistryDao.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.services; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/services/OpenScienceFrameworkServiceRegistryDao.java b/cas-server-support-osf/src/main/java/io/cos/cas/services/OpenScienceFrameworkServiceRegistryDao.java index bc76292c..f2b2e874 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/services/OpenScienceFrameworkServiceRegistryDao.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/services/OpenScienceFrameworkServiceRegistryDao.java @@ -1,22 +1,18 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.services; import io.cos.cas.adaptors.postgres.daos.OpenScienceFrameworkDaoImpl; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java index dd850307..6111cd62 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkAuthenticationExceptionHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.web.flow; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkInstitutionLoginHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkInstitutionLoginHandler.java index 1a1790c6..1366c0e7 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkInstitutionLoginHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkInstitutionLoginHandler.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.web.flow; import io.cos.cas.adaptors.postgres.handlers.OpenScienceFrameworkInstitutionHandler; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkLoginHandler.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkLoginHandler.java index ad3cc928..154d8566 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkLoginHandler.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkLoginHandler.java @@ -1,22 +1,18 @@ /* - * Licensed to Jasig under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Jasig licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.web.flow; import com.google.gson.Gson; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTerminateSessionAction.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTerminateSessionAction.java index 27be21cd..40d5fbe5 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTerminateSessionAction.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTerminateSessionAction.java @@ -1,22 +1,18 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.web.flow; import io.cos.cas.adaptors.postgres.handlers.OpenScienceFrameworkInstitutionHandler; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTicketGrantingTicketCheckAction.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTicketGrantingTicketCheckAction.java index 272658da..b6bfd144 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTicketGrantingTicketCheckAction.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/flow/OpenScienceFrameworkTicketGrantingTicketCheckAction.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.web.flow; diff --git a/cas-server-support-osf/src/main/java/io/cos/cas/web/support/OpenScienceFrameworkCookieRetrievingCookieGenerator.java b/cas-server-support-osf/src/main/java/io/cos/cas/web/support/OpenScienceFrameworkCookieRetrievingCookieGenerator.java index 6f57a313..5e6f00a0 100644 --- a/cas-server-support-osf/src/main/java/io/cos/cas/web/support/OpenScienceFrameworkCookieRetrievingCookieGenerator.java +++ b/cas-server-support-osf/src/main/java/io/cos/cas/web/support/OpenScienceFrameworkCookieRetrievingCookieGenerator.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2016. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 io.cos.cas.web.support; From 0a53d9c243cda0f4a3c2fe99f9d6c5af1d567173 Mon Sep 17 00:00:00 2001 From: longze chen Date: Wed, 6 Nov 2019 10:45:57 -0500 Subject: [PATCH 17/26] Prefix COS modification copyright to maven-overlayed classes OSF CAS uses maven overlay to customize / override many classes from external packages. These classes already have an Apache 2.0 license header from their original creator so we simply added the COS modification copyright on top of it. The copyright year indicates the time of first overlay. In addition, we fixed the "since" tag in the JavaDoc for the classes. This tag should be the same as the original one indicating the time of creation. --- .../cas/support/oauth/OAuthConstants.java | 4 ++- .../jasig/cas/support/oauth/OAuthUtils.java | 4 ++- .../services/OAuthRegisteredService.java | 4 ++- .../OAuth20AuthorizeCallbackController.java | 4 ++- .../oauth/web/OAuth20AuthorizeController.java | 4 ++- .../oauth/web/OAuth20ProfileController.java | 4 ++- .../oauth/web/OAuth20WrapperController.java | 4 ++- .../AbstractClientAuthenticationHandler.java | 2 ++ .../support/ClientAuthenticationHandler.java | 2 ++ .../support/pac4j/web/flow/ClientAction.java | 2 ++ ...edSubmissionHandlerInterceptorAdapter.java | 2 ++ .../org/pac4j/oauth/client/OrcidClient.java | 28 ++++++++++--------- .../orcid/OrcidAttributesDefinition.java | 28 ++++++++++--------- .../org/scribe/builder/api/OrcidApi20.java | 28 ++++++++++--------- 14 files changed, 74 insertions(+), 46 deletions(-) diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthConstants.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthConstants.java index bc201b00..0d2a7e30 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthConstants.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthConstants.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -28,7 +30,7 @@ * @author Jerome Leleu * @author Michael Haselton * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public interface OAuthConstants { diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthUtils.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthUtils.java index 568b6acf..7826a4de 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthUtils.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/OAuthUtils.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -50,7 +52,7 @@ * * @author Jerome Leleu * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public final class OAuthUtils { diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/services/OAuthRegisteredService.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/services/OAuthRegisteredService.java index 8fb6ad3c..03a13175 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/services/OAuthRegisteredService.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/services/OAuthRegisteredService.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -35,7 +37,7 @@ * @author Misagh Moayyed * @author Michael Haselton * @author Longze Chen - * @since 4.1.5 + * @since 4.0.0 */ public final class OAuthRegisteredService extends OSFRegisteredService { diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackController.java index 01ab3db7..18c1e44f 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackController.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -67,7 +69,7 @@ * @author Jerome Leleu * @author Michael Haselton * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public final class OAuth20AuthorizeCallbackController extends AbstractController { diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeController.java index 39b29c7c..371f0ce7 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeController.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -48,7 +50,7 @@ * @author Jerome Leleu * @author Michael Haselton * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public final class OAuth20AuthorizeController extends AbstractController { diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ProfileController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ProfileController.java index 427f0770..fe7c40ee 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ProfileController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ProfileController.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -59,7 +61,7 @@ * @author Jerome Leleu * @author Michael Haselton * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public final class OAuth20ProfileController extends AbstractController { diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20WrapperController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20WrapperController.java index 210b11cb..d8689ffb 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20WrapperController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20WrapperController.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2015. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. @@ -50,7 +52,7 @@ * @author Jerome Leleu * @author Michael Haselton * @author Longze Chen - * @since 4.1.5 + * @since 3.5.0 */ public final class OAuth20WrapperController extends BaseOAuthWrapperController implements InitializingBean { diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java index e42fd264..6e1c4510 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/AbstractClientAuthenticationHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2019. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java index aa24dccb..0acea055 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/authentication/handler/support/ClientAuthenticationHandler.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2019. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java index 82eae6d6..885b33b2 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/support/pac4j/web/flow/ClientAction.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2019. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. diff --git a/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java b/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java index ac199a47..c772b719 100644 --- a/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java +++ b/cas-server-support-osf/src/main/java/org/jasig/cas/web/support/AbstractThrottledSubmissionHandlerInterceptorAdapter.java @@ -1,4 +1,6 @@ /* + * Copyright (c) 2018. Center for Open Science + * * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java index e55cb447..a38c85d6 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/client/OrcidClient.java @@ -1,17 +1,19 @@ /* - Copyright 2012 - 2015 pac4j organization - - 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 - - http://www.apache.org/licenses/LICENSE-2.0 - - 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. + * Copyright (c) 2016. Center for Open Science + * + * Copyright 2012 - 2015 pac4j organization + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.pac4j.oauth.client; diff --git a/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java b/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java index 7b519fc4..27818090 100644 --- a/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java +++ b/cas-server-support-osf/src/main/java/org/pac4j/oauth/profile/orcid/OrcidAttributesDefinition.java @@ -1,17 +1,19 @@ /* - Copyright 2012 - 2015 pac4j organization - - 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 - - http://www.apache.org/licenses/LICENSE-2.0 - - 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. + * Copyright (c) 2018. Center for Open Science + * + * Copyright 2012 - 2015 pac4j organization + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.pac4j.oauth.profile.orcid; diff --git a/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java b/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java index 20d1db50..c1b5ca76 100644 --- a/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java +++ b/cas-server-support-osf/src/main/java/org/scribe/builder/api/OrcidApi20.java @@ -1,17 +1,19 @@ /* - Copyright 2012 - 2015 pac4j organization - - 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 - - http://www.apache.org/licenses/LICENSE-2.0 - - 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. + * Copyright (c) 2016. Center for Open Science + * + * Copyright 2012 - 2015 pac4j organization + * + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.scribe.builder.api; From ca236d0db157b57fd0fdac9a576bfd2d9d651ed9 Mon Sep 17 00:00:00 2001 From: longze chen Date: Thu, 7 Nov 2019 14:11:02 -0500 Subject: [PATCH 18/26] Use COS license header for classes COS-developed in org.jasig.cas With maven-overlay, COS developers created many new classes that have to be packaged under org.jasig.cas in order to extend the features provided by the cas-server-support-oauth-4.1.5.jar lib. These classes should have COS license header instead of Apereo. --- .../cas/services/OSFRegisteredService.java | 25 ++++++++----------- .../support/oauth/CentralOAuthService.java | 25 ++++++++----------- .../oauth/CentralOAuthServiceImpl.java | 25 ++++++++----------- .../oauth/InvalidParameterException.java | 25 ++++++++----------- ...OAuthCredentialsAuthenticationHandler.java | 25 ++++++++----------- .../OAuthAuthenticationMetaDataPopulator.java | 25 ++++++++----------- .../principal/OAuthCredential.java | 25 ++++++++----------- .../oauth/metadata/ClientMetadata.java | 25 ++++++++----------- .../oauth/metadata/PrincipalMetadata.java | 25 ++++++++----------- .../oauth/personal/PersonalAccessToken.java | 25 ++++++++----------- .../personal/PersonalAccessTokenManager.java | 25 ++++++++----------- .../SimplePersonalAccessTokenHandler.java | 25 ++++++++----------- .../AbstractPersonalAccessTokenHandler.java | 25 ++++++++----------- .../support/PersonalAccessTokenHandler.java | 25 ++++++++----------- .../oauth/scope/InvalidScopeException.java | 25 ++++++++----------- .../jasig/cas/support/oauth/scope/Scope.java | 25 ++++++++----------- .../cas/support/oauth/scope/ScopeManager.java | 25 ++++++++----------- .../scope/handler/SimpleScopeHandler.java | 25 ++++++++----------- .../handler/support/AbstractScopeHandler.java | 25 ++++++++----------- .../scope/handler/support/ScopeHandler.java | 25 ++++++++----------- .../OAuthDelegatingExpirationPolicy.java | 25 ++++++++----------- .../support/oauth/token/AbstractToken.java | 25 ++++++++----------- .../cas/support/oauth/token/AccessToken.java | 25 ++++++++----------- .../support/oauth/token/AccessTokenImpl.java | 25 ++++++++----------- .../oauth/token/AuthorizationCode.java | 25 ++++++++----------- .../oauth/token/AuthorizationCodeImpl.java | 25 ++++++++----------- .../oauth/token/InvalidTokenException.java | 25 ++++++++----------- .../cas/support/oauth/token/RefreshToken.java | 25 ++++++++----------- .../support/oauth/token/RefreshTokenImpl.java | 25 ++++++++----------- .../jasig/cas/support/oauth/token/Token.java | 25 ++++++++----------- .../cas/support/oauth/token/TokenType.java | 25 ++++++++----------- .../token/registry/JpaTokenRegistry.java | 25 ++++++++----------- .../oauth/token/registry/TokenRegistry.java | 25 ++++++++----------- ...th20AuthorizeCallbackActionController.java | 25 ++++++++----------- .../web/OAuth20MetadataClientController.java | 25 ++++++++----------- .../OAuth20MetadataPrincipalController.java | 25 ++++++++----------- ...RevokeClientPrincipalTokensController.java | 25 ++++++++----------- .../OAuth20RevokeClientTokensController.java | 25 ++++++++----------- .../web/OAuth20RevokeTokenController.java | 25 ++++++++----------- .../web/OAuth20ServiceValidateController.java | 25 ++++++++----------- .../OAuth20TokenRefreshTokenController.java | 25 ++++++++----------- .../web/view/OAuthCas30ResponseView.java | 25 ++++++++----------- 42 files changed, 462 insertions(+), 588 deletions(-) diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/services/OSFRegisteredService.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/services/OSFRegisteredService.java index 56cfe3e4..c4c77fba 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/services/OSFRegisteredService.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/services/OSFRegisteredService.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2017. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.services; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthService.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthService.java index c4496b2a..6717d31a 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthService.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthService.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthServiceImpl.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthServiceImpl.java index 7abbbdd0..c7a2d801 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthServiceImpl.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/CentralOAuthServiceImpl.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/InvalidParameterException.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/InvalidParameterException.java index 02e8de04..67e4eeb3 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/InvalidParameterException.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/InvalidParameterException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/handler/support/OAuthCredentialsAuthenticationHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/handler/support/OAuthCredentialsAuthenticationHandler.java index b7b9bc8d..a59e6745 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/handler/support/OAuthCredentialsAuthenticationHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/handler/support/OAuthCredentialsAuthenticationHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.authentication.handler.support; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthAuthenticationMetaDataPopulator.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthAuthenticationMetaDataPopulator.java index 37db7692..d0cd118d 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthAuthenticationMetaDataPopulator.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthAuthenticationMetaDataPopulator.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.authentication.principal; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthCredential.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthCredential.java index 17b2af88..35a5310b 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthCredential.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/authentication/principal/OAuthCredential.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.authentication.principal; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/ClientMetadata.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/ClientMetadata.java index 11f0512d..0964ffa5 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/ClientMetadata.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/ClientMetadata.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.metadata; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/PrincipalMetadata.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/PrincipalMetadata.java index f75a2b53..092f14b2 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/PrincipalMetadata.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/metadata/PrincipalMetadata.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.metadata; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessToken.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessToken.java index 7fdeb238..b62eb749 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessToken.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessToken.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.personal; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessTokenManager.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessTokenManager.java index cdddc34e..eba40d62 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessTokenManager.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/PersonalAccessTokenManager.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.personal; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/SimplePersonalAccessTokenHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/SimplePersonalAccessTokenHandler.java index 03101d32..31b8985d 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/SimplePersonalAccessTokenHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/SimplePersonalAccessTokenHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.personal.handler; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/AbstractPersonalAccessTokenHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/AbstractPersonalAccessTokenHandler.java index d75ab532..dfb64c4d 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/AbstractPersonalAccessTokenHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/AbstractPersonalAccessTokenHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.personal.handler.support; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/PersonalAccessTokenHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/PersonalAccessTokenHandler.java index c4208460..e09ef9cc 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/PersonalAccessTokenHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/personal/handler/support/PersonalAccessTokenHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.personal.handler.support; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/InvalidScopeException.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/InvalidScopeException.java index f6966def..886f0c4b 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/InvalidScopeException.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/InvalidScopeException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.scope; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/Scope.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/Scope.java index 71f45994..0348a4a2 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/Scope.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/Scope.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.scope; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/ScopeManager.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/ScopeManager.java index 4557427f..fd80dce0 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/ScopeManager.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/ScopeManager.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.scope; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/SimpleScopeHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/SimpleScopeHandler.java index 54093d01..3f19d549 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/SimpleScopeHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/SimpleScopeHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.scope.handler; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/AbstractScopeHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/AbstractScopeHandler.java index 64e2a637..ff89c57f 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/AbstractScopeHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/AbstractScopeHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.scope.handler.support; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/ScopeHandler.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/ScopeHandler.java index b148db48..890a26db 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/ScopeHandler.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/scope/handler/support/ScopeHandler.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.scope.handler.support; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/ticket/support/OAuthDelegatingExpirationPolicy.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/ticket/support/OAuthDelegatingExpirationPolicy.java index eaa4bce6..672bade5 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/ticket/support/OAuthDelegatingExpirationPolicy.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/ticket/support/OAuthDelegatingExpirationPolicy.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.ticket.support; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AbstractToken.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AbstractToken.java index 18697150..a81fbac8 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AbstractToken.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AbstractToken.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessToken.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessToken.java index de0c120b..ea335d99 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessToken.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessToken.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessTokenImpl.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessTokenImpl.java index e0f63a42..847f5594 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessTokenImpl.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AccessTokenImpl.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCode.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCode.java index efdbbd2b..1cb1408d 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCode.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCode.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCodeImpl.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCodeImpl.java index 53ff4d69..e6767c70 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCodeImpl.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/AuthorizationCodeImpl.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/InvalidTokenException.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/InvalidTokenException.java index 0db6e78a..6aff44f4 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/InvalidTokenException.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/InvalidTokenException.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshToken.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshToken.java index 78249bad..ebb7f20b 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshToken.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshToken.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshTokenImpl.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshTokenImpl.java index 516c4458..bfd8b7c2 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshTokenImpl.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/RefreshTokenImpl.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/Token.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/Token.java index ade73386..aff03282 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/Token.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/Token.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/TokenType.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/TokenType.java index 8a09512f..42653740 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/TokenType.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/TokenType.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/JpaTokenRegistry.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/JpaTokenRegistry.java index 06cce555..daeed922 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/JpaTokenRegistry.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/JpaTokenRegistry.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token.registry; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/TokenRegistry.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/TokenRegistry.java index e8fc7949..06827ee6 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/TokenRegistry.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/token/registry/TokenRegistry.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.token.registry; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackActionController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackActionController.java index 0df3a4b4..c72fa896 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackActionController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20AuthorizeCallbackActionController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataClientController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataClientController.java index 2f4e4dd7..884c5c99 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataClientController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataClientController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataPrincipalController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataPrincipalController.java index 7a2f4ef4..3d4d180c 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataPrincipalController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20MetadataPrincipalController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientPrincipalTokensController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientPrincipalTokensController.java index c51bac3a..2d1883f0 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientPrincipalTokensController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientPrincipalTokensController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientTokensController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientTokensController.java index 374e5337..da4226c9 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientTokensController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientTokensController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeTokenController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeTokenController.java index 976e6316..fdaaae7e 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeTokenController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20RevokeTokenController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ServiceValidateController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ServiceValidateController.java index d2dae7c9..38d46331 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ServiceValidateController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20ServiceValidateController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenRefreshTokenController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenRefreshTokenController.java index b243ec74..61ec5905 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenRefreshTokenController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenRefreshTokenController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/view/OAuthCas30ResponseView.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/view/OAuthCas30ResponseView.java index c6198f78..d31288eb 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/view/OAuthCas30ResponseView.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/view/OAuthCas30ResponseView.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web.view; From 3c1c2820ea036d8736f3bfdc5bcf0bd91eeac9af Mon Sep 17 00:00:00 2001 From: longze chen Date: Thu, 7 Nov 2019 14:23:59 -0500 Subject: [PATCH 19/26] Correct one license and remove an author added by mistake TTBOMK, OAuth20TokenAuthorizationCodeController was very likely created by developers at COS rather than being an overlayed and customized class. The author and license could have been added by mistake, which has now been corrected. --- ...uth20TokenAuthorizationCodeController.java | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenAuthorizationCodeController.java b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenAuthorizationCodeController.java index f6ee6485..aebb9b36 100644 --- a/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenAuthorizationCodeController.java +++ b/cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/OAuth20TokenAuthorizationCodeController.java @@ -1,20 +1,17 @@ /* - * Licensed to Apereo under one or more contributor license - * agreements. See the NOTICE file distributed with this work - * for additional information regarding copyright ownership. - * Apereo licenses this file to you 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 the following location: + * Copyright (c) 2015. Center for Open Science * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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 org.jasig.cas.support.oauth.web; @@ -61,7 +58,6 @@ * {@link CentralOAuthService#grantOfflineAccessToken} with a new service ticket generated from the ticket granting * ticket of the OFFLINE refresh token. * - * @author Jerome Leleu * @author Michael Haselton * @author Longze Chen * @since 4.1.5 From cd6ee079e0b380f4ae92a91b5f602c23184a3715 Mon Sep 17 00:00:00 2001 From: longze chen Date: Thu, 14 Nov 2019 11:11:54 -0500 Subject: [PATCH 20/26] Update license for spring configuration XMLs --- .../auditTrailManager.xml | 25 +++++++-------- .../authenticationDelegation.xml | 25 +++++++-------- .../authenticationManager.xml | 25 +++++++-------- .../spring-configuration/dataSource.xml | 29 ++++++++--------- .../WEB-INF/spring-configuration/filters.xml | 9 +++++- .../healthCheckMonitor.xml | 25 +++++++-------- .../spring-configuration/loginManager.xml | 29 ++++++++--------- .../loginRateLimiting.xml | 31 +++++++++---------- .../oAuthApplicationContext.xml | 25 +++++++-------- .../oAuthPersonalTokenManager.xml | 29 ++++++++--------- .../oAuthScopeManager.xml | 25 +++++++-------- .../oAuthTokenRegistry.xml | 25 +++++++-------- .../oAuthUniqueIdGenerators.xml | 2 ++ .../propertyFileConfigurer.xml | 2 ++ .../protocolViewsConfiguration.xml | 6 ++++ .../serviceRegistryDao.xml | 2 ++ .../ticketExpirationPolicies.xml | 2 ++ .../ticketGrantingTicketCookieGenerator.xml | 2 ++ .../spring-configuration/ticketRegistry.xml | 2 ++ 19 files changed, 157 insertions(+), 163 deletions(-) diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/auditTrailManager.xml b/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/auditTrailManager.xml index af587f5b..570e9d17 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/auditTrailManager.xml +++ b/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/auditTrailManager.xml @@ -1,22 +1,19 @@ - \ No newline at end of file + diff --git a/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/healthCheckMonitor.xml b/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/healthCheckMonitor.xml index 011ec944..801e03e0 100644 --- a/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/healthCheckMonitor.xml +++ b/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/healthCheckMonitor.xml @@ -1,22 +1,19 @@ - + Copyright (c) 2018. Center for Open Science + + 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 + + http://www.apache.org/licenses/LICENSE-2.0 + + 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. + +--> diff --git a/etc/log4j2.xml b/etc/log4j2.xml index 1d519d4f..2fb7b191 100755 --- a/etc/log4j2.xml +++ b/etc/log4j2.xml @@ -2,6 +2,8 @@