Lines Matching refs:macaroon
173 UwMacaroon macaroon{}; in CreateMacaroonToken() local
174 CHECK(uw_macaroon_create_from_root_key_(&macaroon, secret.data(), in CreateMacaroonToken()
180 CHECK(uw_macaroon_serialize_(&macaroon, serialized_token.data(), in CreateMacaroonToken()
188 const UwMacaroon& macaroon, in ExtendMacaroonToken() argument
194 UwMacaroon prev_macaroon = macaroon; in ExtendMacaroonToken()
217 UwMacaroon* macaroon, in LoadMacaroon() argument
221 buffer->size(), macaroon)) { in LoadMacaroon()
229 const UwMacaroon& macaroon, in VerifyMacaroon() argument
237 if (!uw_macaroon_validate_(&macaroon, secret.data(), secret.size(), &context, in VerifyMacaroon()
347 UwMacaroon macaroon{}; in ParseAccessToken() local
351 if (!LoadMacaroon(token, &buffer, &macaroon, error) || in ParseAccessToken()
352 macaroon.num_caveats != 5 || in ParseAccessToken()
353 !VerifyMacaroon(access_secret_, macaroon, now, &result, error)) { in ParseAccessToken()
451 UwMacaroon macaroon{}; in IsValidAuthToken() local
453 if (!LoadMacaroon(token, &buffer, &macaroon, error) || in IsValidAuthToken()
454 !VerifyMacaroon(auth_secret_, macaroon, Now(), &result, error)) { in IsValidAuthToken()
469 UwMacaroon macaroon{}; in CreateAccessTokenFromAuth() local
472 if (!LoadMacaroon(auth_token, &buffer, &macaroon, error) || in CreateAccessTokenFromAuth()
473 !VerifyMacaroon(auth_secret_, macaroon, now, &result, error)) { in CreateAccessTokenFromAuth()
552 UwMacaroon macaroon{}; in DelegateToUser() local
553 CHECK(LoadMacaroon(token, &buffer, &macaroon, nullptr)); in DelegateToUser()
573 return ExtendMacaroonToken(macaroon, now, caveats); in DelegateToUser()