Created
October 13, 2015 17:02
-
-
Save trane/c041908c1e25134bb1c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ServiceRouter1[ServiceIdentifier] => ... | |
| // Map[ServiceIdentifier, Httpx.Client] | |
| // (ServiceRouter / SessionIdRouter / IdentityRouter / AccessRouter) {(service, session, identity, access) => ...} | |
| // | |
| // ServiceRouter2[UpstreamService] | |
| // case class UpstreamService(id: ServiceIdentifier) { | |
| // val service = Httpx.newClient() | |
| // val endpoint = authFilterChain andThen service | |
| // } | |
| // authFilterChain = SessionIdFilter andThen IdentityFilter andThen ... | |
| // object ServiceBinder { | |
| // def apply(id: ServiceIdentifier): Service[Request, Response] = | |
| // forall {id : ServiceIdentifers} one-to-one {client: UpstreamService} | |
| // } | |
| // | |
| val routes = | |
| get("sso") { ... } :+: | |
| ServiceRouter1 /> authFilterChain andThen ServiceBinder(_) | |
| ServiceRouter2 /> _.endpoint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment