+
Skip to content

Move documentation to keycloak-client #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions docs/guides/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>asciidoc</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>generated-guides/**</include>
</includes>
</fileSet>
</fileSets>
</assembly>
9 changes: 9 additions & 0 deletions docs/guides/attributes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:project_name: Keycloak
:project_doc_base_url: https://www.keycloak.org/docs/latest
:apidocs_name: API Documentation
:apidocs_link: https://www.keycloak.org/docs/latest/api_documentation/
:authorizationguide_name: Authorization Services Guide
:authorizationguide_name_short: Authorization Services
:authorizationguide_link: {project_doc_base_url}/authorization_services/
:section: guide
:sections: guides
Binary file added docs/guides/images/pep-pattern-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 159 additions & 0 deletions docs/guides/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-client-docs-parent</artifactId>
<version>26.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<name>Keycloak Client Guides</name>
<artifactId>keycloak-client-guides</artifactId>
<description>Keycloak Client Guides</description>
<packaging>jar</packaging>

<properties>
<version.keycloak.client>${project.version}</version.keycloak.client>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-images</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/generated-docs/images</outputDirectory>
<resources>
<resource>
<directory>${basedir}/images</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-attributes</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/generated-guides/</outputDirectory>
<resources>
<resource>
<directory>${basedir}/</directory>
<includes>
<include>attributes.adoc</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-included-files</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/generated-guides/</outputDirectory>
<resources>
<resource>
<directory>${basedir}/</directory>
<includes>
<include>**/examples/**/*.*</include>
<include>**/partials/**/*.*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-client-guides-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>generate-asciidoc</id>
<goals>
<goal>keycloak-guide</goal>
</goals>
<configuration>
<sourceDir>${project.basedir}</sourceDir>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<configuration>
<sourceDocumentName>index.adoc</sourceDocumentName>
<backend>html5</backend>
<sourceHighlighter>coderay</sourceHighlighter>
<attributes>
<toc>left</toc>
<toc>left</toc>
<icons>font</icons>
<sectanchors>true</sectanchors>
<idprefix/>
<idseparator>-</idseparator>
<docinfo1>true</docinfo1>
<imagesdir>../images</imagesdir>
<attribute-missing>warn</attribute-missing>
<version-client>${project.version}</version-client>
</attributes>
<logHandler>
<failIf>
<severity>ERROR</severity>
</failIf>
</logHandler>
</configuration>
<executions>
<execution>
<id>keycloak-client-asciidoc-to-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<sourceDirectory>${basedir}/target/generated-guides/securing-apps</sourceDirectory>
<outputDirectory>${project.build.directory}/generated-docs/securing-apps</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>create-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
41 changes: 41 additions & 0 deletions docs/guides/securing-apps/admin-client.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<#import "/templates/guide.adoc" as tmpl>
<#import "/templates/links.adoc" as links>

<@tmpl.guide
title="{project_name} admin client"
priority=500
summary="Using the {project_name} admin client to access the {project_name} Admin REST API">

The {project_name} admin client is a Java library that facilitates the access and usage of the {project_name} Admin REST API. To use it from your application add a dependency on the
`keycloak-admin-client` library. For example using Maven:

[source,xml,subs="attributes+"]
----
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>${client_version}</version>
</dependency>
----

The following example shows how to use the Java client library to get the details of the master realm:

[source,java,subs="attributes+"]
----

import org.keycloak.admin.client.Keycloak;
import org.keycloak.representations.idm.RealmRepresentation;
...

Keycloak keycloak = Keycloak.getInstance(
"http://localhost:8080",
"master",
"admin",
"password",
"admin-cli");
RealmRepresentation realm = keycloak.realm("master").toRepresentation();
----

Complete Javadoc for the admin client is available at {apidocs_link}[{apidocs_name}].

</@tmpl.guide>
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载