-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApi.java
More file actions
50 lines (41 loc) · 1.27 KB
/
Api.java
File metadata and controls
50 lines (41 loc) · 1.27 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
47
48
49
50
package org.scribe.builder.api;
import org.scribe.model.Encoding;
import org.scribe.model.OAuthConfig;
import org.scribe.model.Verb;
import org.scribe.oauth.OAuthService;
import org.scribe.processors.extractors.TokenExtractor;
/**
* Contains all the configuration needed to instantiate a valid {@link OAuthService}.
*
* @author Pablo Fernandez
*
*/
public interface Api {
TokenExtractor getAccessTokenExtractor();
Verb getAccessTokenVerb();
boolean hasGrantType();
String getGrantType();
Encoding getAccessTokenEncoding();
/**
* Returns the URL that receives the access token requests.
*
* @return access token URL
*/
String getAccessTokenEndpoint();
/**
* Returns the URL where you should redirect your users to authenticate
* your application.
*
* @param config OAuth 2.0 configuration param object
* @param stateToken optional state token for protecting against csrf attacks
* @return the URL where you should redirect your users
*/
String getAuthorizationUrl(OAuthConfig config, String stateToken);
/**
* Creates an {@link OAuthService}.
*
* @param config for this service
* @return fully configured {@link OAuthService}
*/
OAuthService createService(OAuthConfig config);
}