Skip to content
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3369ff5
testing lambdas
rideam Jul 14, 2023
22bc130
update images
rideam Jul 14, 2023
b96dd83
update images
rideam Jul 16, 2023
57f77cb
Testing lambdas language first edit
worktheclock Jul 17, 2023
8300f43
Testing lambdas fix formatting
worktheclock Jul 18, 2023
6020240
Merge pull request #107 from ritza-co/testing-lambdas-fix-formatting
worktheclock Jul 18, 2023
59528fa
Merge pull request #106 from ritza-co/testing-lambdas-language-first-…
sixhobbits Jul 18, 2023
c7d93ea
add toc
rideam Jul 18, 2023
ef1e844
format limitations
rideam Jul 19, 2023
763ce9c
Testing lambdas language edit
worktheclock Jul 19, 2023
929d0bf
Merge pull request #108 from ritza-co/testing-lambdas-language-edit
sixhobbits Jul 20, 2023
0c37be0
Apply suggestions from code review
sixhobbits Aug 15, 2023
7025cf1
Titlecase headings
Aug 15, 2023
4ec789d
Moving lambda limitations into its own include file
Aug 15, 2023
eca331e
Using external code snippets
Aug 16, 2023
d941820
Using temporary users in the new repo
Aug 16, 2023
ad9e90b
Remove unusual line terminators from docsreadme file
Aug 17, 2023
2601ef5
Added new unit test for roles and permissions
Aug 17, 2023
69d177b
Given up trying to get remote tag includes to work in .md. And given …
Aug 17, 2023
14d0832
Make todo when moving to Astro
Aug 17, 2023
225c429
Add another todo for Astro
Aug 17, 2023
4e5b41a
Added description of linking and unlinking lambdas to applications
Aug 18, 2023
6da9b01
Merge branch 'master' into testing-lambdas
rideam Aug 20, 2023
6617215
text updates
rideam Aug 21, 2023
836aea2
Revised Testing Lambdas language edit
worktheclock Aug 21, 2023
83502a8
Merge pull request #126 from ritza-co/revised-testing-lambdas-languag…
sixhobbits Aug 22, 2023
4d78e18
fix json snippet tag causing text to render in red
rideam Aug 22, 2023
eea2f9b
remove TOC
rideam Aug 22, 2023
720fb1c
Remove link and unlink lambdas from node cli
Sep 5, 2023
36d0544
"There are two ways to do this using Javascript"
Sep 5, 2023
a7621a2
Remove fusionauth.io absolute links
Sep 5, 2023
4eb6908
Moved JWt and User properties to JSON files in /docs/src/json
Sep 5, 2023
c6db7c8
Moved lambda article from customizations-testing to guides. And image…
Sep 5, 2023
6ff1b37
Converted tests 1 and 2 to separate files
Sep 5, 2023
32f181c
Add section explaining how to run all tests
Sep 5, 2023
bb72170
Finished article.
Sep 5, 2023
727bdb0
Use eval to run tests
Sep 5, 2023
54d3da4
Making security warning less dramatic
Sep 5, 2023
f5e7bff
include fixes and text updates
rideam Sep 8, 2023
0a9a955
text updates
rideam Sep 8, 2023
a3f7d02
Lambda Guide language edit
worktheclock Sep 15, 2023
88ff125
Merge pull request #133 from ritza-co/lambda-guide-language-edit
sixhobbits Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions site/_includes/docs/_lambda-limitations.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
== Limitations

If the Identity Provider linking strategy is set to `Link Anonymously`, no lambdas will be used by FusionAuth. More information about the link:/docs/v1/tech/identity-providers/#linking-strategies[Identity Provider linking strategies is available here].

The FusionAuth lambdas do not have full access to JavaScript modules and libraries. They also cannot import, require or load other libraries currently. These features might be added to our lambda support in the future.

`console.log` and other `console` methods only take one argument; this differs from the `console` method available in web browsers.

=== Lambda HTTP Connect Limitations

include::docs/v1/tech/shared/_advanced-edition-blurb.adoc[]

When using Lambda HTTP Connect to make HTTP requests, do not call a FusionAuth API which invokes the calling lambda, because it will fail. For example, in a JWT Populate lambda, do not invoke the Login API.

Requests from a lambda require the lambda to use the GraalJS engine. HTTP requests will time out after two seconds.

The `fetch` method in a lambda does not implement the https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API[entire `fetch` API] as implemented in a browser.
The first argument to `fetch` must always be a string URL.
Only the following options are supported:

* `method`, which defaults to `GET`
* `headers`, which defaults to null
* `body`, which must be a string
1 change: 1 addition & 0 deletions site/_layouts/doc.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@
<a href="#" class="sub-menu">Lambdas <i class="fal fa-chevron-{% if page.url contains "/lambdas/" %}up{% else %}down{% endif %} fa-fw"></i></a>
<ul>
<li {% if page.url == "/docs/v1/tech/lambdas/" %}class="active"{% endif %}><a href="/docs/v1/tech/lambdas/">Overview</a></li>
<li {% if page.url == "/docs/v1/tech/lambdas/testing-lambdas.html" %}class="active"{% endif %}><a href="/docs/v1/tech/lambdas/testing-lambdas">Testing Lambdas</a></li>
{% comment %}Don't add a new lambda here. Add it to the site/_data/lambdas.yaml file and the menu item will be generated.{% endcomment %}
{% assign lambdas = site.data.lambdas | sort: 'displayName' %}
{% for lambda in lambdas %}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 5 additions & 27 deletions site/docs/v1/tech/lambdas/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function populate(jwt, user, registration) {
"Content-Type": "application/json"
}
});

if (response.status === 200) {
// assuming successful response looks like:
// {"status":"statusValue"}
Expand All @@ -95,7 +95,7 @@ function populate(jwt, user, registration) {
"Authorization": "bf69486b-4733-4470-a592-f1bfce7af580"
}
});

if (response.status === 200) {
// a successful response as defined in the Groups API
var jsonResponse = JSON.parse(response.body);
Expand Down Expand Up @@ -137,7 +137,7 @@ headers: new Headers([
])
----

==== Response
==== Response

A response object will be returned. It will have the following fields:

Expand Down Expand Up @@ -221,33 +221,11 @@ In general, exceptions should not be used for flow control and should instead be

To view exception details, enable debugging on the lambda via the [field]#Debug enabled# toggle in the administrative user interface or the API.

== Limitations

If the Identity Provider linking strategy is set to `Link Anonymously`, no lambdas will be used by FusionAuth. More information about the link:/docs/v1/tech/identity-providers/#linking-strategies[Identity Provider linking strategies is available here].

The FusionAuth lambdas do not have full access to JavaScript modules and libraries. They also cannot import, require or load other libraries currently. These features might be added to our lambda support in the future.

`console.log` and other `console` methods only take one argument; this differs from the `console` method available in web browsers.

=== Lambda HTTP Connect Limitations

include::docs/v1/tech/shared/_advanced-edition-blurb.adoc[]

When using Lambda HTTP Connect to make HTTP requests, do not call a FusionAuth API which invokes the calling lambda, because it will fail. For example, in a JWT Populate lambda, do not invoke the Login API.

Requests from a lambda require the lambda to use the GraalJS engine. HTTP requests will time out after two seconds.

The `fetch` method in a lambda does not implement the https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API[entire `fetch` API] as implemented in a browser.
The first argument to `fetch` must always be a string URL.
Only the following options are supported:

* `method`, which defaults to `GET`
* `headers`, which defaults to null
* `body`, which must be a string
{% include docs/_lambda-limitations.adoc %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO for Dan: update the lambda section of the limitations doc to include this.


== Future Engines

The Nashorn engine is being phased out of Java in favor of more robust and advanced engines.
The Nashorn engine is being phased out of Java in favor of more robust and advanced engines.

[NOTE.note]
====
Expand Down
Loading