|
@@ -188,6 +188,8 @@ namespace TEAMModelOS.Services
|
|
|
}
|
|
|
catch { }
|
|
|
|
|
|
+ //換取AuthToken,提供給前端
|
|
|
+ var auth_token = JwtAuthExtension.CreateAuthToken(_option.HostName, id, name?.ToString(), picture?.ToString(), _option.JwtSecretKey, Website: "IES", scope: Constant.ScopeTeacher, standard: "", roles: roles.ToArray(), expire: 1);
|
|
|
|
|
|
//取得Teacher Blob 容器位置及SAS
|
|
|
await _azureStorage.GetBlobContainerClient(id).CreateIfNotExistsAsync(PublicAccessType.None); //嘗試創建Teacher私有容器,如存在則不做任何事,保障容器一定存在
|
|
@@ -197,7 +199,8 @@ namespace TEAMModelOS.Services
|
|
|
blob_uri = blob_uri,
|
|
|
blob_sas = blob_sas,
|
|
|
defaultschool = defaultschool,
|
|
|
- teacher = teacher
|
|
|
+ teacher = teacher,
|
|
|
+ auth_token = auth_token,
|
|
|
};
|
|
|
}
|
|
|
public static async Task<TeacherInfo> TeacherInfo(AzureCosmosFactory _azureCosmos, Teacher teacher, string name, string picture, string id,
|