Skip to content

Commit e2a482d

Browse files
committed
Added Stack Exchange Provider
1 parent 1ba9d35 commit e2a482d

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ target
33
.project
44
.settings
55
external/src/main/generated-source/
6+
*/src/META-INF/
67
*.sw?
78
.DS_Store
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
package org.jboss.seam.security.external.openid.providers;
2+
3+
import java.util.List;
4+
5+
import org.jboss.seam.security.external.openid.api.OpenIdRelyingPartyApi;
6+
import org.jboss.seam.security.external.openid.api.OpenIdRequestedAttribute;
7+
8+
/**
9+
* Open ID provider for StackExchange Accounts
10+
*
11+
* @author <a href="mailto:[email protected]">Lincoln Baxter, III</a>
12+
*/
13+
public class StackExchangeOpenIdProvider implements OpenIdProvider {
14+
public static final String CODE = "stackexchange";
15+
16+
private boolean requestFirstName = true;
17+
private boolean requestLastName = true;
18+
private boolean requestEmail = true;
19+
20+
public boolean isRequestFirstName() {
21+
return requestFirstName;
22+
}
23+
24+
public void setRequestFirstName(boolean value) {
25+
this.requestFirstName = value;
26+
}
27+
28+
public boolean isRequestLastName() {
29+
return requestLastName;
30+
}
31+
32+
public void setRequestLastName(boolean value) {
33+
this.requestLastName = value;
34+
}
35+
36+
public boolean isRequestEmail() {
37+
return requestEmail;
38+
}
39+
40+
public void setRequestEmail(boolean value) {
41+
this.requestEmail = value;
42+
}
43+
44+
@Override
45+
public String getCode() {
46+
return CODE;
47+
}
48+
49+
@Override
50+
public String getName() {
51+
return "StackExchange";
52+
}
53+
54+
@Override
55+
public String getUrl() {
56+
return "https://openid.stackexchange.com/";
57+
}
58+
59+
@Override
60+
public void requestAttributes(OpenIdRelyingPartyApi openIdApi, List<OpenIdRequestedAttribute> attributes) {
61+
}
62+
}

0 commit comments

Comments
 (0)