nl.surfnet.coin.selfservice.interceptor
Class AuthorityScopeInterceptor
java.lang.Object
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
nl.surfnet.coin.selfservice.interceptor.AuthorityScopeInterceptor
- All Implemented Interfaces:
- org.springframework.web.servlet.HandlerInterceptor
public class AuthorityScopeInterceptor
- extends org.springframework.web.servlet.handler.HandlerInterceptorAdapter
Interceptor to de-scope the visibility
objects for display
See https
://wiki.surfnetlabs.nl/display/services/App-omschrijving
|
Method Summary |
protected static boolean |
containsRole(List<CoinAuthority.Authority> authorities,
CoinAuthority.Authority... authority)
|
protected boolean |
isRoleShowroomUser(List<CoinAuthority.Authority> authorities)
|
void |
postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
org.springframework.web.servlet.ModelAndView modelAndView)
|
boolean |
preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
|
protected void |
scopeGeneralAuthCons(org.springframework.ui.ModelMap map,
List<CoinAuthority.Authority> authorities,
javax.servlet.http.HttpServletRequest request)
|
protected Collection<nl.surfnet.coin.csa.model.Service> |
scopeListOfServices(Collection<nl.surfnet.coin.csa.model.Service> services,
List<CoinAuthority.Authority> authorities)
Reduce list based on whether the SP 'is linked' to the current IdP. |
protected void |
scopeService(org.springframework.ui.ModelMap map,
nl.surfnet.coin.csa.model.Service service,
List<CoinAuthority.Authority> authorities)
|
| Methods inherited from class org.springframework.web.servlet.handler.HandlerInterceptorAdapter |
afterCompletion |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthorityScopeInterceptor
public AuthorityScopeInterceptor()
preHandle
public boolean preHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler)
throws Exception
- Specified by:
preHandle in interface org.springframework.web.servlet.HandlerInterceptor- Overrides:
preHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- Throws:
Exception
postHandle
public void postHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Object handler,
org.springframework.web.servlet.ModelAndView modelAndView)
throws Exception
- Specified by:
postHandle in interface org.springframework.web.servlet.HandlerInterceptor- Overrides:
postHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
- Throws:
Exception
scopeGeneralAuthCons
protected void scopeGeneralAuthCons(org.springframework.ui.ModelMap map,
List<CoinAuthority.Authority> authorities,
javax.servlet.http.HttpServletRequest request)
scopeListOfServices
protected Collection<nl.surfnet.coin.csa.model.Service> scopeListOfServices(Collection<nl.surfnet.coin.csa.model.Service> services,
List<CoinAuthority.Authority> authorities)
- Reduce list based on whether the SP 'is linked' to the current IdP.
- Returns:
- a reduced list, or the same, if no changes.
scopeService
protected void scopeService(org.springframework.ui.ModelMap map,
nl.surfnet.coin.csa.model.Service service,
List<CoinAuthority.Authority> authorities)
isRoleShowroomUser
protected boolean isRoleShowroomUser(List<CoinAuthority.Authority> authorities)
containsRole
protected static boolean containsRole(List<CoinAuthority.Authority> authorities,
CoinAuthority.Authority... authority)
Copyright © 2012-2013 SURFnet bv, The Netherlands. All Rights Reserved.