Skip to content

Commit

Permalink
COR-476: move endpoint to login server
Browse files Browse the repository at this point in the history
  • Loading branch information
internetti committed Jun 3, 2022
1 parent 62e7d8d commit 86ed11d
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 27 deletions.
18 changes: 0 additions & 18 deletions frontend/packages/core-api-client/src/client/AdminClient.ts

This file was deleted.

4 changes: 4 additions & 0 deletions frontend/packages/core-api-client/src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { FolderClient } from './Folder';
import { FormClient } from './Form';
import { RecordClient } from './Record';
import { RecipientClient } from './Recipient';
import { IdentityClient } from './Identity';

export class Client extends BaseRESTClient implements ClientDefinition {
static corev1 = 'apis/core.nrc.no/v1';
Expand All @@ -20,12 +21,15 @@ export class Client extends BaseRESTClient implements ClientDefinition {

public Recipient: RecipientClient;

public Identity: IdentityClient;

constructor(address: string) {
super(`${address}/${Client.corev1}`);
this.Database = new DatabaseClient(this);
this.Folder = new FolderClient(this);
this.Form = new FormClient(this);
this.Record = new RecordClient(this, this.Form);
this.Recipient = new RecipientClient(this.Record, this.Form);
this.Identity = new IdentityClient(this);
}
}
2 changes: 1 addition & 1 deletion frontend/packages/core-api-client/src/client/Identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
IdentityClientDefinition,
IdentityGetRequest,
IdentityGetResponse,
} from '../types/client/Identity';
} from '../types';

import { BaseRESTClient } from './BaseRESTClient';

Expand Down
1 change: 0 additions & 1 deletion frontend/packages/core-api-client/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { Client } from './Client';
export { AdminClient } from './AdminClient';

This file was deleted.

2 changes: 2 additions & 0 deletions frontend/packages/core-api-client/src/types/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { FolderClientDefinition } from './Folder';
import { FormClientDefinition } from './Form';
import { RecordClientDefinition } from './Record';
import { RecipientClientDefinition } from './Recipient';
import { IdentityClientDefinition } from './Identity';

export interface ClientDefinition {
Database: DatabaseClientDefinition;
Folder: FolderClientDefinition;
Form: FormClientDefinition;
Record: RecordClientDefinition;
Recipient: RecipientClientDefinition;
Identity: IdentityClientDefinition;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export * from './Database';
export * from './Folder';
export * from './Form';
export * from './Record';
export * from './Identity';

export * from './utils';
2 changes: 1 addition & 1 deletion pkg/server/authnzapi/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package authnzapi
import (
"context"
"github.com/nrc-no/core/pkg/server/authnzapi/handlers/clients"
"github.com/nrc-no/core/pkg/server/authnzapi/handlers/identity"
"github.com/nrc-no/core/pkg/server/authnzapi/handlers/identityprovider"
"github.com/nrc-no/core/pkg/server/authnzapi/handlers/organization"
"github.com/nrc-no/core/pkg/server/generic"
"github.com/nrc-no/core/pkg/server/login/handlers/identity"
"github.com/nrc-no/core/pkg/server/options"
"github.com/nrc-no/core/pkg/store"
"github.com/ory/hydra-client-go/client/admin"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewHandler(store store.IdentityProfileStore) *Handler {
h := &Handler{store: store}

ws := new(restful.WebService).
Path("/apis/admin.nrc.no/v1/identities").
Path("/apis/core.nrc.no/v1/identities").
Doc("identities.admin.nrc.no API")

h.webService = ws
Expand Down

0 comments on commit 86ed11d

Please sign in to comment.