All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sss.openstar.nodebuilder.GetProviderPrefixBuilder.scala Maven / Gradle / Ivy

package sss.openstar.nodebuilder

import sss.openstar.attachments.RemoteAttachmentsService.GetProviderPrefix
import sss.openstar.identityledger.ProviderAttachmentUrlAttribute


trait RequireGetProviderPrefix {
  val getProviderPrefix: GetProviderPrefix
}

trait GetProviderPrefixBuilder
  extends RequireGetProviderPrefix {

  self: IdentityServiceBuilder =>

  override lazy val getProviderPrefix: GetProviderPrefix = remoteNode => {
    identityService.listAttributes(remoteNode)
      .collectFirst {
        case ProviderAttachmentUrlAttribute(baseUrl) => baseUrl
      }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy