-
Notifications
You must be signed in to change notification settings - Fork 2
/
ExampleAuthActivity.java
74 lines (60 loc) · 1.66 KB
/
ExampleAuthActivity.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.samsandberg.stravaauthenticatorexample;
import android.content.Intent;
import com.samsandberg.stravaauthenticator.StravaAuthenticateActivity;
import com.samsandberg.stravaauthenticator.StravaScopes;
import java.util.Arrays;
import java.util.Collection;
public class ExampleAuthActivity extends StravaAuthenticateActivity {
/*****************************************
* Methods override START
*/
/**
* Client ID
*/
protected String getStravaClientId() {
return "YOUR-STRAVA-CLIENT-ID";
}
/**
* Client Secret
*/
protected String getStravaClientSecret() {
return "YOUR-STRAVA-CLIENT-SECRET";
}
/**
* Scopes to auth for
* (default public)
*/
protected Collection<String> getStravaScopes() {
return Arrays.asList(StravaScopes.SCOPE_PUBLIC);
}
/**
* Should we use the local cache?
* (default true)
*/
protected boolean getStravaUseCache() {
return true;
}
/**
* Should we check a token (against Strava's API) or should we just assume it's good?
* (default true)
*/
protected boolean getStravaCheckToken() {
return true;
}
/**
* What intent should we kick off, given OK auth
*/
protected Intent getStravaActivityIntent() {
return new Intent(this, ExampleMainActivity.class);
}
/**
* Should we finish this activity after successful auth + kicking off next activity?
* (default true)
*/
protected boolean getStravaFinishOnComplete() {
return true;
}
/**
* Methods override END
****************************************/
}