Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @ManagedBean
  2. @ApplicationScoped
  3. public class RedirectToOAUTH {
  4.  
  5. private final String LOGIN = "https://services.brics.dk/java/dovs-auth/authorize?client_id=dovs&redirect_uri=http://localhost:1337/overview.xhtml&response_type=code";
  6. public void sendTo(){
  7. ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
  8. try {
  9. externalContext.redirect(LOGIN);
  10. } catch (IOException e) {
  11. e.printStackTrace();
  12. }
  13. }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement