-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
GoogleOAuth2AuthenticationProvider.java
41 lines (30 loc) · 1.3 KB
/
GoogleOAuth2AuthenticationProvider.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* (c) 2016 Open Source Geospatial Foundation - all rights reserved
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.security.oauth2;
import org.geoserver.config.util.XStreamPersister;
import org.geoserver.security.GeoServerSecurityManager;
/**
* @author Alessio Fabiani, GeoSolutions S.A.S.
*
*/
public class GoogleOAuth2AuthenticationProvider extends GeoServerOAuthAuthenticationProvider {
// Default values
protected String accessTokenUri = "https://accounts.google.com/o/oauth2/token";
protected String userAuthorizationUri = "https://accounts.google.com/o/oauth2/auth";
protected String redirectUri = "http://localhost:8080/geoserver";
protected String checkTokenEndpointUrl = "https://www.googleapis.com/oauth2/v1/tokeninfo";
protected String logoutUri = "https://accounts.google.com/logout";
public GoogleOAuth2AuthenticationProvider(GeoServerSecurityManager securityManager) {
super(securityManager);
}
@Override
public void handlePostChanged(GeoServerSecurityManager securityManager) {
// Nothing to do
}
@Override
public void configure(XStreamPersister xp) {
xp.getXStream().alias("googleOauth2Authentication", GoogleOAuth2FilterConfig.class);
}
}