Skip to content
Snippets Groups Projects
Commit 4f360f5f authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Add STS generation

parent 0ae9dee1
Branches
Tags
1 merge request!12BREAKING: ApiV2 & Updated api-client
......@@ -67,9 +67,11 @@ public class CoscineCodeGenerator : CodeGenerator
internal override Task<string> GetCustomBasePath(string directoryName)
{
var appendedPath = directoryName == "Coscine.Api.STS"
? $"/api/{directoryName}"
: "";
return Task.FromResult(
$"https://' + getHostName() + '/coscine/api/{directoryName}"
.Replace("/coscine/api/Coscine.Api", "/coscine")
$"https://' + getHostName() + '/coscine{appendedPath}"
);
}
......@@ -79,9 +81,6 @@ public class CoscineCodeGenerator : CodeGenerator
// Keep it like that for formatting
combinationFileText += @"
if (typeof coscine !== 'undefined' && typeof coscine.authorization !== 'undefined') {
accessToken = 'Bearer ' + coscine.authorization.bearer;
}
if (typeof window !== 'undefined') {
// LocalStorage > Global Variables
const localStorageToken = localStorage.getItem('coscine.authorization.bearer');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment