Interface CertificationHandler<Cert extends org.skr.security.Certification>


public interface CertificationHandler<Cert extends org.skr.security.Certification>
  • Method Summary

    Modifier and Type
    Method
    Description
    org.skr.security.UserPrincipal
    authenticate(Cert certification, Map<String,Object> arguments)
    Authenticate given Certification and return corresponding UserPrincipal to it.
    findByIdentity(@NonNull String certificationIdentity)
    Find Certification by given certificationIdentity.
    getCertification(@NonNull org.skr.security.UserPrincipal principal)
     
    void
    removeCertification(@NonNull org.skr.security.UserPrincipal principal, @NonNull String certificationIdentity)
    Remove a Certification for UserPrincipal
    org.skr.security.UserPrincipal
    saveCertification(org.skr.security.UserPrincipal principal, Cert certification, Map<String,Object> arguments)
    Tells that how to save given Certification and bind it to UserPrincipal
    boolean
    supports(@NonNull org.skr.security.Certification certification)
    check if this handler could be apply to certain Certification
  • Method Details

    • supports

      boolean supports(@NonNull @NonNull org.skr.security.Certification certification)
      check if this handler could be apply to certain Certification
    • authenticate

      org.skr.security.UserPrincipal authenticate(@NonNull Cert certification, Map<String,Object> arguments) throws org.skr.common.exception.AuthException
      Authenticate given Certification and return corresponding UserPrincipal to it.
      Parameters:
      arguments - extra argument to help locating UserPrincipal
      Returns:
      UserPrincipal to given Certification
      Throws:
      org.skr.common.exception.AuthException - if given Certification is not authenticated.
    • findByIdentity

      Cert findByIdentity(@NonNull @NonNull String certificationIdentity)
      Find Certification by given certificationIdentity. Certification.getIdentity() should be unique per certification scope.
      Returns:
      Certification that has certificationIdentity
    • getCertification

      Cert getCertification(@NonNull @NonNull org.skr.security.UserPrincipal principal)
      Returns:
      Certification of given UserPrincipal
    • saveCertification

      org.skr.security.UserPrincipal saveCertification(org.skr.security.UserPrincipal principal, @NonNull Cert certification, Map<String,Object> arguments)
      Tells that how to save given Certification and bind it to UserPrincipal
    • removeCertification

      void removeCertification(@NonNull @NonNull org.skr.security.UserPrincipal principal, @NonNull @NonNull String certificationIdentity)
      Remove a Certification for UserPrincipal
      Parameters:
      certificationIdentity - of removing Certification