ProfileScope.java
1.29 KB
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
42
43
44
45
46
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.servlet.http.HttpServletRequest
* org.apache.jackrabbit.api.security.user.User
* org.slf4j.Logger
* org.slf4j.LoggerFactory
*/
package com.adobe.granite.oauth.server.scopes.impl;
import com.adobe.granite.oauth.server.Scope;
import javax.servlet.http.HttpServletRequest;
import org.apache.jackrabbit.api.security.user.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ProfileScope
implements Scope {
private static final Logger logger = LoggerFactory.getLogger(ProfileScope.class);
public static final String PROFILE_API_URI = "/libs/oauth/profile";
public static final String PROFILE_SCOPE_NAME = "profile";
public String getResourcePath(User user) {
try {
return user.getPath() + "/profile";
}
catch (Exception e) {
logger.error("OAuth System Exception ", (Throwable)e);
throw new RuntimeException("OAuth System Exception");
}
}
public String getEndpoint() {
return "/libs/oauth/profile";
}
public String getName() {
return "profile";
}
public String getDescription(HttpServletRequest request) {
return "View basic information about your account";
}
}