Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump mysql-connector-java from 5.1.36 to 8.0.28 #15

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ docker run -p 8080:8080 easemob/easemob-im-live-server

- 直播间服务需调用环信REST接口,该模块提供调用环信REST服务,包含token、user、chatroom API的调用,封装了调用所需的RequestBody、ResponseBody。

#### [qiniu-service](./qiniu-service)

- 获取七牛云直播推拉流地址。

#### [agora-server](./agora-app-server)

- 获取声网token。
Expand All @@ -145,6 +141,3 @@ docker run -p 8080:8080 easemob/easemob-im-live-server
- 直播间支持点播功能
- 直播间支持Docker部署
- 直播间详情返回的成员列表过滤了owner

### 1.0.2.Final
- 支持获取七牛云推拉流地址
5 changes: 3 additions & 2 deletions agora-app-server/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# AgoraAppServer
AgoraAppServer用来获取声网Token
环信AppServer通过http接口获取Token

## 介绍
AgoraAppServer是用来获取声网Token的开源项目。
5 changes: 4 additions & 1 deletion agora-app-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
<version>2.6</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
* ClassName: SpringBootApplication
* description:
* author: lijian
* date: 2021-01-19 09:15
**/
@EnableDiscoveryClient
@SpringBootApplication
public class AgoraServerApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)
public class SecurityConfig extends WebSecurityConfigurerAdapter {

@Autowired
/*@Autowired
private SecurityAuthenticationEntryPoint unauthorizedHandler;

@Autowired
Expand All @@ -49,17 +49,17 @@ public TokenAuthenticationProcessingFilter tokenFilter() {
@Bean
public UsernameAuthenticationProcessingFilter usernameFilter() {
return new UsernameAuthenticationProcessingFilter();
}
}*/

@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}

@Override protected void configure(AuthenticationManagerBuilder auth) throws Exception {
/* @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(tokenAuthenticationProvider);
auth.authenticationProvider(usernameProvider);
}
}*/

@Override protected void configure(HttpSecurity http) throws Exception {

Expand All @@ -69,32 +69,33 @@ public RestTemplate restTemplate(RestTemplateBuilder builder) {
.csrf()
.disable()
.exceptionHandling()
.authenticationEntryPoint(unauthorizedHandler)
//.authenticationEntryPoint(unauthorizedHandler)
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers("/",
"/management/**",
"/favicon.ico",
"/**/*.png",
"/**/*.gif",
"/**/*.svg",
"/**/*.jpg",
"/**/*.html",
"/**/*.css",
"/**/*.js")
.permitAll()
.antMatchers("/token/**", "/channel/**")
.hasAuthority("user")
.anyRequest()
.authenticated();
.anonymous();
// .authorizeRequests()
// .antMatchers("/",
// "/management/**",
// "/favicon.ico",
// "/**/*.png",
// "/**/*.gif",
// "/**/*.svg",
// "/**/*.jpg",
// "/**/*.html",
// "/**/*.css",
// "/**/*.js")
// .permitAll()
// .antMatchers("/token/**", "/channel/**")
// .hasAuthority("user")
// .anyRequest()
// .authenticated();

// 添加token auth filter
// 也可以支持username password的方式只需要配置相应的filter和provider
http.addFilterBefore(tokenFilter(), UsernamePasswordAuthenticationFilter.class);
http.addFilterAfter(usernameFilter(), TokenAuthenticationProcessingFilter.class);
//http.addFilterBefore(tokenFilter(), UsernamePasswordAuthenticationFilter.class);
//http.addFilterAfter(usernameFilter(), TokenAuthenticationProcessingFilter.class);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Collections;

@Slf4j
@Component
//@Component
public class TokenAuthenticationProvider implements AuthenticationProvider {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Collections;

@Slf4j
@Component
//@Component
public class UsernameAuthenticationProvider implements AuthenticationProvider {

private final RestManger restManger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.io.IOException;

@Slf4j
@Component
//@Component
public class SecurityAuthenticationEntryPoint implements AuthenticationEntryPoint {

@Override
Expand Down
15 changes: 13 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.36</version>
<version>8.0.28</version>
</dependency>

<dependency>
Expand All @@ -77,5 +77,16 @@
<version>1.2.51</version>
</dependency>
</dependencies>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>