Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
added support for the form provider endpoint (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
edewit authored Jun 14, 2021
1 parent ca67697 commit dfd278c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/resources/authenticationManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ export class AuthenticationManagement extends Resource {
path: '/flows',
});

public getFormProviders = this.makeRequest<void, Record<string, any>>({
method: 'GET',
path: '/form-providers',
});

public createFlow = this.makeRequest<AuthenticationFlowRepresentation, void>({
method: 'POST',
path: '/flows',
Expand Down
7 changes: 7 additions & 0 deletions test/authenticationManagement.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ describe('Authentication management', () => {
});
});
describe('Flows', () => {
it('should get the registered form providers', async () => {
const formProviders = await kcAdminClient.authenticationManagement.getFormProviders();

expect(formProviders).to.be.ok;
expect(formProviders.length).to.be.eq(1);
expect(formProviders[0].displayName).to.be.eq('Registration Page');
});

it('should get authentication flow', async () => {
const flows = await kcAdminClient.authenticationManagement.getFlows();
Expand Down

0 comments on commit dfd278c

Please sign in to comment.