def proxy.auth.checked

bend-kit-http@0.38.2.0 · http.bend:2967

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

2967def proxy.auth.checked(+decoded: String, valid: Bool) -> Maybe<&2, String>:
2968  match valid:
2969    case False{}:
2970      None{}
2971    case True{}:
2972      Some{"Basic " ++ Bytes.to_base64(Bytes.from_string(decoded))}

Uses (6)

Used by (1)