-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geochart - Proxy - no authentication needed
- Loading branch information
1 parent
2b612fd
commit edf5b51
Showing
7 changed files
with
20 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import bearFactory, { | ||
FixedLoginAndPasswordAuthProvider, | ||
ContextDeferredAuthProvider, | ||
AnonymousAuthProvider, | ||
} from "@gooddata/sdk-backend-bear"; | ||
import { backend } from "../../constants"; | ||
|
||
import { backend as hostname } from "../../constants"; | ||
export const createBackend = () => | ||
bearFactory({ hostname: backend }).withAuthentication(new AnonymousAuthProvider()); | ||
|
||
const backendConfig = process.env.REACT_APP_SET_HOSTNAME ? { hostname } : {}; | ||
|
||
export const createBackend = () => { | ||
return bearFactory(backendConfig).withAuthentication(new ContextDeferredAuthProvider()); | ||
}; | ||
|
||
export const backendWithCredentials = (backend, username, password) => { | ||
return backend.withAuthentication(new FixedLoginAndPasswordAuthProvider(username, password)); | ||
}; | ||
export const backendWithCredentials = (backend, username, password) => | ||
backend.withAuthentication(new FixedLoginAndPasswordAuthProvider(username, password)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.