Class DefaultPrincipalElectionStrategy

java.lang.Object
org.apereo.cas.authentication.principal.DefaultPrincipalElectionStrategy
All Implemented Interfaces:
Serializable, org.apereo.cas.authentication.PrincipalElectionStrategy, org.springframework.core.Ordered

public class DefaultPrincipalElectionStrategy extends Object implements org.apereo.cas.authentication.PrincipalElectionStrategy
This is DefaultPrincipalElectionStrategy that selects the primary principal to be the first principal in the chain of authentication history.
Since:
4.2.0
See Also:
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface org.apereo.cas.authentication.PrincipalElectionStrategy

    BEAN_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver)
     
    DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apereo.cas.authentication.principal.merger.AttributeMerger
     
    int
     
    org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver
     
    org.apereo.cas.authentication.principal.PrincipalFactory
     
    org.apereo.cas.authentication.principal.Principal
    nominate(Collection<org.apereo.cas.authentication.Authentication> authentications, Map<String,List<Object>> principalAttributes)
     
    org.apereo.cas.authentication.principal.Principal
    nominate(List<org.apereo.cas.authentication.principal.Principal> principals, Map<String,List<Object>> attributes)
     
    void
    setAttributeMerger(org.apereo.cas.authentication.principal.merger.AttributeMerger attributeMerger)
     
    void
    setOrder(int order)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultPrincipalElectionStrategy

      public DefaultPrincipalElectionStrategy()
    • DefaultPrincipalElectionStrategy

      public DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver)
    • DefaultPrincipalElectionStrategy

      public DefaultPrincipalElectionStrategy(org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver principalElectionConflictResolver)
  • Method Details

    • nominate

      public org.apereo.cas.authentication.principal.Principal nominate(Collection<org.apereo.cas.authentication.Authentication> authentications, Map<String,List<Object>> principalAttributes) throws Throwable
      Specified by:
      nominate in interface org.apereo.cas.authentication.PrincipalElectionStrategy
      Throws:
      Throwable
    • nominate

      public org.apereo.cas.authentication.principal.Principal nominate(List<org.apereo.cas.authentication.principal.Principal> principals, Map<String,List<Object>> attributes) throws Throwable
      Specified by:
      nominate in interface org.apereo.cas.authentication.PrincipalElectionStrategy
      Throws:
      Throwable
    • setAttributeMerger

      public void setAttributeMerger(org.apereo.cas.authentication.principal.merger.AttributeMerger attributeMerger)
    • setOrder

      public void setOrder(int order)
    • getPrincipalFactory

      public org.apereo.cas.authentication.principal.PrincipalFactory getPrincipalFactory()
    • getPrincipalElectionConflictResolver

      public org.apereo.cas.authentication.PrincipalElectionStrategyConflictResolver getPrincipalElectionConflictResolver()
    • getAttributeMerger

      public org.apereo.cas.authentication.principal.merger.AttributeMerger getAttributeMerger()
      Specified by:
      getAttributeMerger in interface org.apereo.cas.authentication.PrincipalElectionStrategy
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Specified by:
      getOrder in interface org.apereo.cas.authentication.PrincipalElectionStrategy