-
Keycloak
-
identity provider https://www.keycloak.org/
-
-
MailHog
-
an email testing tool for developers https://github.com/mailhog/MailHog
-
-
rdf-pub server
-
The real server
-
Preconditions
-
There should be a running docker/docker-compose installation on your system.
-
Provided docker-compose was tested on a ubuntu system.
git clone https://gitlab.com/linkedopenactors/rdf-pub.git
cd rdf-pub/
git checkout tags/0.0.6 -b main
cd devEnv/guest/independent/
docker-compose up
Note: Replace the tag with the newest availabe Release
Testing
-
swagger ui: http://localhost:8081/swagger-ui/index.html
-
rdf-pub server meta data: http://localhost:8081/actuator/info
-
rdf-pub server health endpoint: http://localhost:8081/actuator/health
-
keycloak: http://localhost:8080/auth/
-
Log in to the keycloak admin console : http://localhost:8080/auth/admin/
-
user: admin
-
pwd: admin
-
-
-
MailHog: http://localhost:8025/
Getting an Account
First you have to register on the keycloak instance, therefore start your browser and goto:
-
Click on
Sign In
on the upper right. -
Click on
Register
on the bottom of the appearing dialog -
Fill the form and click on
Register
-
Open MailHog: http://localhost:8025/
-
Open the Mail
Subject: Verify email
and click the verification link. -
You are redirected to keycloak. Registration is done!
-
Start a console and send a
curl
:
curl --location --request GET 'http://localhost:8081/.well-known/webfinger?resource=acct:<username>'
-
^ replace
<username>
with the username you used while registration or your email address. -
You should get an answer like the following:
{
"subject": "acct:tester",
"links": [
{
"rel": "self",
"type": "application/activity+json",
"href": "http://localhost:8081/actor/831da9b5-a293-47bd-889d-228e4ef4f91e"
}
]
}
-
links.href
contains the url of your action in rdf-pub. -
rdf-pub does not yet know you as an actor, so your profile will not be publicly available yet. You have to log in once and call up your profile so that rdf-pub can "get to know" you
-
Therefore open postman, and create a new GET request there.
-
copy the
links.href
url and put it in your newly created postman GET request. -
Goto the
Authorization
tab and choose OAuth 2.0 as Type. -
On the right fill in:
-
Token Name: 'any name you like'
-
Grant Type: Authorization COde
-
Callback URL: http://localhost:8081/
-
Auth URL: http://localhost:8080/auth/realms/LOA/protocol/openid-connect/auth
-
Access Token URL: http://localhost:8080/auth/realms/LOA/protocol/openid-connect/token
-
Client ID: rdf-pub-users
-
Client Secret: leave it empty
-
Scope & State: also empty
-
Client Authentication: Send as Basic Header
-
-
Click on
Get New Access Token
-
Click on
Proceed
-
Click on
Use Token
-
And now you can click on
Send
to request the actor profile. -
Because you ha not specified an
Accept
type, you get JSON-LD. You can also requesttext/turtle
, if you add aAccept
header attribute with valuetext/turtle
. -
From now on, the profile of that actor should be publicly available.