def proxy.auth.checked
import bend-kit-http@0.38.2.0/http.bend as Httpimport 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))}