nl.surfnet.coin.selfservice.domain
Class CoinUser

java.lang.Object
  extended by nl.surfnet.coin.selfservice.domain.CoinUser
All Implemented Interfaces:
Serializable, org.springframework.security.core.userdetails.UserDetails

public class CoinUser
extends Object
implements org.springframework.security.core.userdetails.UserDetails

Simple conext user

See Also:
Serialized Form

Constructor Summary
CoinUser()
           
 
Method Summary
 void addAttribute(String key, List<String> value)
           
 void addAuthority(CoinAuthority grantedAuthority)
           
 void addInstitutionIdp(IdentityProvider idp)
           
 Map<String,List<String>> getAttributeMap()
          Map of user attributes, key as String, value Object
 Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
          Returns a collection that will contain CoinAuthority's
 String getDisplayName()
          Display name, e.g.
 String getEmail()
           
 String getIdp()
          Identifier of the IdentityProvider the user has logged in with
 String getInstitutionId()
          Identifier of the institution the IdentityProvider of the user belongs to.
 List<IdentityProvider> getInstitutionIdps()
          List of IdentityProvider's of the institution for this users.
 String getPassword()
          It is not allowed to call this method
 String getSchacHomeOrganization()
           
 String getUid()
          Unique identifier of the user, e.g.
 String getUsername()
          Same value as getUid()

 boolean isAccountNonExpired()
           
 boolean isAccountNonLocked()
           
 boolean isCredentialsNonExpired()
           
 boolean isEnabled()
           
 void setAttributeMap(Map<String,List<String>> attributeMap)
           
 void setAuthorities(List<CoinAuthority> grantedAuthorities)
           
 void setDisplayName(String displayName)
           
 void setEmail(String email)
           
 void setIdp(String idp)
           
 void setInstitutionId(String institutionId)
           
 void setSchacHomeOrganization(String schacHomeOrganization)
           
 void setUid(String uid)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoinUser

public CoinUser()
Method Detail

getPassword

public String getPassword()
It is not allowed to call this method

Specified by:
getPassword in interface org.springframework.security.core.userdetails.UserDetails

getUsername

public String getUsername()
Same value as getUid()

Specified by:
getUsername in interface org.springframework.security.core.userdetails.UserDetails

isAccountNonExpired

public boolean isAccountNonExpired()
Specified by:
isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails

isAccountNonLocked

public boolean isAccountNonLocked()
Specified by:
isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails

isCredentialsNonExpired

public boolean isCredentialsNonExpired()
Specified by:
isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.springframework.security.core.userdetails.UserDetails

getUid

public String getUid()
Unique identifier of the user, e.g. urn:collab:person:org.example:john.doe

Returns:
unique identifier of the user

setUid

public void setUid(String uid)

getDisplayName

public String getDisplayName()
Display name, e.g. 'John S. Doe Jr'

Returns:
display name of the user

setDisplayName

public void setDisplayName(String displayName)

getSchacHomeOrganization

public String getSchacHomeOrganization()
Returns:
schac home organization of the user

setSchacHomeOrganization

public void setSchacHomeOrganization(String schacHomeOrganization)

getEmail

public String getEmail()
Returns:
email address of the user

setEmail

public void setEmail(String email)

getAuthorities

public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
Returns a collection that will contain CoinAuthority's

Specified by:
getAuthorities in interface org.springframework.security.core.userdetails.UserDetails

setAuthorities

public void setAuthorities(List<CoinAuthority> grantedAuthorities)

addAuthority

public void addAuthority(CoinAuthority grantedAuthority)

getInstitutionIdps

public List<IdentityProvider> getInstitutionIdps()
List of IdentityProvider's of the institution for this users. Usually contains only the IdP the user logs in with.

Returns:
List of IdentityProvider's

addInstitutionIdp

public void addInstitutionIdp(IdentityProvider idp)

getInstitutionId

public String getInstitutionId()
Identifier of the institution the IdentityProvider of the user belongs to. Can be empty.

Returns:
Identifier of the institution the IdentityProvider of the user belongs to

setInstitutionId

public void setInstitutionId(String institutionId)

getIdp

public String getIdp()
Identifier of the IdentityProvider the user has logged in with

Returns:
Identifier of the IdentityProvider the user has logged in with

setIdp

public void setIdp(String idp)

getAttributeMap

public Map<String,List<String>> getAttributeMap()
Map of user attributes, key as String, value Object

Returns:
Map of user attributes

setAttributeMap

public void setAttributeMap(Map<String,List<String>> attributeMap)

addAttribute

public void addAttribute(String key,
                         List<String> value)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 SURFnet bv, The Netherlands. All Rights Reserved.