-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from bd2kccd/v1.3.0
V1.3.0
- Loading branch information
Showing
296 changed files
with
18,005 additions
and
3,960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/edu/pitt/dbmi/ccd/web/conf/Auth0Configurer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (C) 2016 University of Pittsburgh. | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
* MA 02110-1301 USA | ||
*/ | ||
package edu.pitt.dbmi.ccd.web.conf; | ||
|
||
import com.auth0.web.Auth0Config; | ||
import com.auth0.web.Auth0Filter; | ||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | ||
import org.springframework.boot.web.servlet.FilterRegistrationBean; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
|
||
/** | ||
* | ||
* Oct 6, 2016 3:47:55 PM | ||
* | ||
* @author Kevin V. Bui ([email protected]) | ||
*/ | ||
@Profile("auth0") | ||
@Configuration | ||
@ComponentScan(basePackages = {"com.auth0.web"}) | ||
@EnableAutoConfiguration | ||
public class Auth0Configurer { | ||
|
||
@Bean | ||
public FilterRegistrationBean filterRegistration(Auth0Config auth0Config) { | ||
final FilterRegistrationBean registration = new FilterRegistrationBean(); | ||
registration.setFilter(new Auth0Filter(auth0Config)); | ||
registration.addUrlPatterns(auth0Config.getSecuredRoute()); | ||
registration.addInitParameter("redirectOnAuthError", auth0Config.getLoginRedirectOnFail()); | ||
registration.setName("Auth0Filter"); | ||
|
||
return registration; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.