feat(auth): implement generic oauth2 provider

This commit is contained in:
Fredrik Adelöw
2020-07-02 09:19:02 +02:00
parent 0ab1f0d8e8
commit 77fe78370b
14 changed files with 520 additions and 28 deletions
+23 -12
View File
@@ -1,21 +1,23 @@
import {
ApiRegistry,
AlertApiForwarder,
alertApiRef,
ApiRegistry,
ErrorAlerter,
ErrorApiForwarder,
errorApiRef,
GithubAuth,
githubAuthApiRef,
GitlabAuth,
gitlabAuthApiRef,
GoogleAuth,
googleAuthApiRef,
identityApiRef,
OAuth2,
oauth2ApiRef,
oauthRequestApiRef,
OAuthRequestManager,
googleAuthApiRef,
githubAuthApiRef,
gitlabAuthApiRef,
oktaAuthApiRef,
AlertApiForwarder,
ErrorApiForwarder,
ErrorAlerter,
GoogleAuth,
GithubAuth,
GitlabAuth,
OktaAuth,
identityApiRef,
oktaAuthApiRef,
} from '@backstage/core';
const builder = ApiRegistry.builder();
@@ -72,4 +74,13 @@ builder.add(
}),
);
builder.add(
oauth2ApiRef,
OAuth2.create({
apiOrigin: 'http://localhost:7000',
basePath: '/auth/',
oauthRequestApi,
}),
);
export const apis = builder.build();