Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
  * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
  */
 package com.hp.autonomy.frontend.configuration.authentication;
 
    private final String configUrl;
    private final String applicationUrl;
    private final String roleDefault;
    public LoginSuccessHandler(final String roleDefaultfinal String configUrlfinal String applicationUrl) {
        super();
        this. = roleDefault;
        this. = configUrl;
        this. = applicationUrl;
    }
    @Override
    protected String determineTargetUrl(final HttpServletRequest requestfinal HttpServletResponse response) {
        final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        for(final GrantedAuthority grantedAuthority : authentication.getAuthorities()) {
            if(.equalsIgnoreCase(grantedAuthority.getAuthority())) {
                return ;
            }
        }
        return ;
    }
New to GrepCode? Check out our FAQ X