Skip to content

Commit

Permalink
[Fleet] Remove unused authenticateAgentWithAccessToken method from ag…
Browse files Browse the repository at this point in the history
…ent service (#116183)
  • Loading branch information
nchaulet authored Oct 25, 2021
1 parent 81264f7 commit 0119bd8
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 203 deletions.
1 change: 0 additions & 1 deletion x-pack/plugins/fleet/server/mocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export const createMockAgentService = (): jest.Mocked<AgentService> => {
return {
getAgentStatusById: jest.fn(),
getAgentStatusForAgentPolicy: jest.fn(),
authenticateAgentWithAccessToken: jest.fn(),
getAgent: jest.fn(),
listAgents: jest.fn(),
};
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/fleet/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ import {
import {
getAgentStatusById,
getAgentStatusForAgentPolicy,
authenticateAgentWithAccessToken,
getAgentsByKuery,
getAgentById,
} from './services/agents';
Expand Down Expand Up @@ -342,7 +341,6 @@ export class FleetPlugin
listAgents: getAgentsByKuery,
getAgentStatusById,
getAgentStatusForAgentPolicy,
authenticateAgentWithAccessToken,
},
agentPolicyService: {
get: agentPolicyService.get,
Expand Down
156 changes: 0 additions & 156 deletions x-pack/plugins/fleet/server/services/agents/authenticate.test.ts

This file was deleted.

34 changes: 0 additions & 34 deletions x-pack/plugins/fleet/server/services/agents/authenticate.ts

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/plugins/fleet/server/services/agents/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ export * from './crud';
export * from './update';
export * from './actions';
export * from './reassign';
export * from './authenticate';
export * from './setup';
10 changes: 1 addition & 9 deletions x-pack/plugins/fleet/server/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
* 2.0.
*/

import type { KibanaRequest } from 'kibana/server';
import type { ElasticsearchClient, SavedObjectsClientContract } from 'kibana/server';

import type { AgentStatus, Agent } from '../types';
import type { AgentStatus } from '../types';

import type { GetAgentStatusResponse } from '../../common';

Expand Down Expand Up @@ -48,13 +47,6 @@ export interface AgentService {
* Get an Agent by id
*/
getAgent: typeof getAgentById;
/**
* Authenticate an agent with access toekn
*/
authenticateAgentWithAccessToken(
esClient: ElasticsearchClient,
request: KibanaRequest
): Promise<Agent>;
/**
* Return the status by the Agent's id
*/
Expand Down

0 comments on commit 0119bd8

Please sign in to comment.