Project

General

Profile

« Previous | Next » 

Revision 51525

1. Add roles for aai
2. Changes on converter file for new interface object
3. Move emailUtils to avoid bug on bean definitions
4. Add openaire provider authorities mapper class
5. Bug fixes on controllers

View differences:

UserApiImpl.java
30 30
        LOGGER.debug("User authentication : " + authentication);
31 31
        Map<String,Object> body = new HashMap<>();
32 32
        body.put("sub",authentication.getSub());
33
        if(authentication.getUserInfo().getName() == null || authentication.getUserInfo().getName().equals("")) {
33
        if(authentication.getUserInfo().getName() == null || authentication.getUserInfo().getName().equals(""))
34 34
            body.put("name",authentication.getUserInfo().getGivenName() + " " + authentication.getUserInfo().getFamilyName());
35
        } else {
35
        else
36 36
            body.put("name",authentication.getUserInfo().getName());
37
        }
37

  
38
        for (GrantedAuthority authority : authentication.getAuthorities())
39
            LOGGER.debug("Role: " + authority.getAuthority());
40

  
38 41
        body.put("email",authentication.getUserInfo().getEmail());
39 42
        List<String> roles = authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList());
40 43
        body.put("role",roles);

Also available in: Unified diff