TF-2177 Fix download attachment not working on web
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit 09cbfe5245c206670aa2191c151fd8f2ea48df3a)
This commit is contained in:
@@ -19,6 +19,24 @@ class AccountRequest with EquatableMixin {
|
||||
this.authenticationType = AuthenticationType.none,
|
||||
});
|
||||
|
||||
factory AccountRequest.withOidc({required Token token}) {
|
||||
return AccountRequest(
|
||||
token: token,
|
||||
authenticationType: AuthenticationType.oidc
|
||||
);
|
||||
}
|
||||
|
||||
factory AccountRequest.withBasic({
|
||||
required UserName userName,
|
||||
required Password password
|
||||
}) {
|
||||
return AccountRequest(
|
||||
userName: userName,
|
||||
password: password,
|
||||
authenticationType: AuthenticationType.basic
|
||||
);
|
||||
}
|
||||
|
||||
String get basicAuth => 'Basic ${base64Encode(utf8.encode('${userName?.value}:${password?.value}'))}';
|
||||
|
||||
String get bearerToken => 'Bearer ${token?.token}';
|
||||
|
||||
Reference in New Issue
Block a user