use of org.obiba.mica.web.controller.domain.OidcProvider in project mica2 by obiba.
the class SignController method signup.
@GetMapping("/signup")
public ModelAndView signup(HttpServletRequest request, @RequestParam(value = "redirect", required = false) String redirect, @CookieValue(value = "NG_TRANSLATE_LANG_KEY", required = false, defaultValue = "en") String locale, @RequestParam(value = "language", required = false) String language) {
if (!micaConfigService.getConfig().isSignupEnabled())
return new ModelAndView("redirect:" + micaConfigService.getContextPath() + "/");
ModelAndView mv = new ModelAndView("signup");
String lang = getLang(locale, language);
List<OidcProvider> providers = getOidcProviders(lang, true).stream().map(o -> new OidcProvider(o, getOidcSignupUrl(o.getName(), request, redirect))).collect(Collectors.toList());
mv.getModel().put("oidcProviders", providers);
mv.getModel().put("authConfig", getAuthConfiguration());
return mv;
}
use of org.obiba.mica.web.controller.domain.OidcProvider in project mica2 by obiba.
the class SignController method signin.
@GetMapping("/signin")
public ModelAndView signin(HttpServletRequest request, @RequestParam(value = "redirect", required = false) String redirect, @CookieValue(value = "NG_TRANSLATE_LANG_KEY", required = false, defaultValue = "en") String locale, @RequestParam(value = "language", required = false) String language) {
ModelAndView mv = new ModelAndView("signin");
String lang = getLang(locale, language);
List<OidcProvider> providers = getOidcProviders(lang, false).stream().map(o -> new OidcProvider(o, getOidcSigninUrl(o.getName(), request, redirect))).collect(Collectors.toList());
mv.getModel().put("oidcProviders", providers);
return mv;
}
Aggregations