@Controller @RequestMapping(value="/canvas") public class CanvasSignInController extends Object
Constructor and Description |
---|
CanvasSignInController(org.springframework.social.connect.ConnectionFactoryLocator connectionFactoryLocator,
org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository,
org.springframework.social.connect.web.SignInAdapter signInAdapter,
String clientId,
String clientSecret,
String canvasPage) |
Modifier and Type | Method and Description |
---|---|
View |
error(String error,
String errorDescription) |
protected View |
postDeclineView()
View that redirects the top level window to the URL defined in postDeclineUrl property after user declines to authorize application.
|
void |
setPostDeclineUrl(String postDeclineUrl)
The URL or path to redirect to if a user declines authorization.
|
void |
setPostSignInUrl(String postSignInUrl)
The URL or path to redirect to after successful canvas authorization.
|
void |
setScope(String scope)
The scope to request during authorization.
|
View |
signin(Model model,
NativeWebRequest request) |
@Inject public CanvasSignInController(org.springframework.social.connect.ConnectionFactoryLocator connectionFactoryLocator, org.springframework.social.connect.UsersConnectionRepository usersConnectionRepository, org.springframework.social.connect.web.SignInAdapter signInAdapter, String clientId, String clientSecret, String canvasPage)
public void setPostSignInUrl(String postSignInUrl)
postSignInUrl
- the url to redirect to after successful canvas authorization. Defaults to "/".public void setPostDeclineUrl(String postDeclineUrl)
postDeclineView()
method to return a different implementation of View
.postDeclineUrl
- the url to redirect to after a user declines authorization. Defaults to "http://www.facebook.com".public void setScope(String scope)
scope
- the scope to request. Defaults to null (no scope will be requested; Facebook will offer their default scope).@RequestMapping(method={POST,GET}, params={"signed_request","!error"}) public View signin(Model model, NativeWebRequest request) throws SignedRequestException
SignedRequestException
@RequestMapping(method={POST,GET}, params="error") public View error(@RequestParam(value="error") String error, @RequestParam(value="error_description") String errorDescription)
protected View postDeclineView()