mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-10 07:12:41 +00:00
* docs: first attempt to restructure the sdks and examples to make it better understandable * docs: first attempt to restructure the sdks and examples to make it better understandable * docs: first attempt to restructure the sdks and examples to make it better understandable * docs: first attempt to restructure the sdks and examples to make it better understandable * docs: first attempt to restructure the sdks and examples to make it better understandable * docs: first attempt to restructure the sdks and examples to make it better understandable * docs: adding more example pages * docs: adding more example pages * docs: add all sdk/examples * docs: add tile component * docs: introduction page * docs: introduction page * docs: add react * docs: remove old sdk and example pages * docs: fix broken links * docs: fix broken links * styles * Update docs/docs/sdk-examples/introduction.mdx Co-authored-by: Livio Spring <livio.a@gmail.com> * Update docs/docs/sdk-examples/java.mdx Co-authored-by: Livio Spring <livio.a@gmail.com> * Update docs/docs/sdk-examples/python.mdx Co-authored-by: Livio Spring <livio.a@gmail.com> * Update docs/docs/sdk-examples/python.mdx Co-authored-by: Livio Spring <livio.a@gmail.com> * docs: review changes * docs: smaller tiles * docs: changes from go and java review * docs: correct python description * Update docs/docs/sdk-examples/python.mdx Co-authored-by: Livio Spring <livio.a@gmail.com> * Update docs/docs/sdk-examples/introduction.mdx Co-authored-by: Tim Möhlmann <tim+github@zitadel.com> * Update docs/docs/sdk-examples/python.mdx Co-authored-by: Tim Möhlmann <tim+github@zitadel.com> * docs: flask logo * flask, rust imgs * docs: flask logo * Update go.mdx * Update java.mdx * Update docs/docs/sdk-examples/flutter.mdx Co-authored-by: Livio Spring <livio.a@gmail.com> * Update docs/src/css/tile.module.css Co-authored-by: Livio Spring <livio.a@gmail.com> * docs: sidebar alphabetic * docs: sidebar alphabetic * docs: django logo --------- Co-authored-by: peintnermax <max@caos.ch> Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Tim Möhlmann <tim+github@zitadel.com> Co-authored-by: Stefan Benz <stefan@caos.ch>
106 lines
4.1 KiB
Plaintext
106 lines
4.1 KiB
Plaintext
---
|
|
title: Go
|
|
sidebar_label: Go
|
|
---
|
|
|
|
<table>
|
|
<tr>
|
|
<td width="100px">
|
|
<img width="100px" src="/docs/img/tech/golang.svg" alt="go logo"/>
|
|
</td>
|
|
<td>
|
|
<a href="https://go.dev/" target="_blank">Go</a> is an open-source, compiled programming language that is known for its simplicity, efficiency, and concurrency capabilities.
|
|
Get started integrating authentication to your Go Application by checking out our <a href="https://github.com/zitadel/zitadel-go" target="_blank">zitadel-go</a> SDK.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
### Resources
|
|
- [Example App Repository](https://github.com/zitadel/zitadel-go)
|
|
- [Go SDK](https://github.com/zitadel/zitadel-go)
|
|
- [Web APP Step-By-Step Guide](/docs/examples/login/go)
|
|
- [API APP Step-By-Step Guide](/docs/examples/secure-api/go)
|
|
- [Go OIDC Library](https://github.com/zitadel/oidc)
|
|
|
|
### Go SDK
|
|
|
|
The [zitadel-go](https://github.com/zitadel/zitadel-go) SDK is a wrapper around the [zitadel/oidc](https://github.com/zitadel/oidc) to integrate Login into your Web App and abstracts the handling of specific configurations for ZITADEL.
|
|
Additionally secure your business APIs and handle permission checks for your users.
|
|
Last part is the integration of the ZITADEL APIs to handle user and resource management.
|
|
|
|
The following features are covered by the SDK:
|
|
- Authentication in your Web App
|
|
- Authenticate your user with ZITADEL using OIDC
|
|
- Requesting ZITADEL userinfo endpoint to get user data
|
|
- Refresh Token
|
|
- Requesting User Roles from userinfo
|
|
- Check if user has specified role
|
|
- Logout
|
|
- Secure your APIs
|
|
- Authorization Check using OAuth2 Introspection
|
|
- Check User Roles on Endpoint
|
|
- Manage Resources through ZITADEL APIs
|
|
- Authenticate Service User
|
|
- Generated gRPC Clients for integrating ZITADEL API
|
|
- User, Organization, Project, etc. Management
|
|
|
|
The goal is to extend the SDK over the time with the following features:
|
|
- Build your own login UI using our Session API
|
|
|
|
### Go Examples
|
|
|
|
You can find different examples for building your Go application in the following package of the repository:
|
|
[zitadel-go/example](https://github.com/zitadel/zitadel-go/tree/next/example)
|
|
|
|
#### Web Application Example
|
|
|
|
What does the Web Application Example include:
|
|
- Home Page with Login Button
|
|
- Authenticating user with OIDC PKCE Flow
|
|
- Public Page: Accessible without authentication
|
|
- Private Page: Shows user information of authenticated user, only accessible after login
|
|
- Logout
|
|
|
|
[Example Web App](https://github.com/zitadel/zitadel-go/tree/next/example/app)
|
|
|
|
#### API Application Example
|
|
|
|
What does the API Application Example include:
|
|
- REST API Application secured with Spring Security and OAuth2
|
|
- Public Endpoint: Accessible without authentication
|
|
- Private Endpoint: Accessible with a token
|
|
- Administrator Endpoint: Accessible with a token of a user with admin role
|
|
|
|
[Example API App](https://github.com/zitadel/zitadel-go/tree/next/example/api/http)
|
|
|
|
### Step-By-Step Guide
|
|
|
|
For Go we do have two different Step-By-Step Guides.
|
|
One to create your web application with integrated login and one to create your API with permission checks for calling users.
|
|
The guides lead you through the whole process from configuring the right application in ZITADEL to a ready application with integrated login or authentication checks.
|
|
|
|
#### Web Application Guide
|
|
|
|
After completing the Step-By-Step Guide you will have:
|
|
1. Example Web Application with integrated ZITADEL Login
|
|
2. Example page accessible by authenticated user showing retrieved user information
|
|
4. Logout
|
|
5. Correct setup for your application in ZITADEL
|
|
|
|
[Web APP Step-By-Step Guide](/docs/examples/login/go)
|
|
|
|

|
|

|
|
|
|
#### API Application Guide
|
|
|
|
After completing the Step-By-Step Guide you will have:
|
|
1. Example REST API checking tokens against ZITADEL with OAuth2
|
|
2. Public Endpoint accessible by any user
|
|
3. Private Endpoint accessible by authenticated user
|
|
4. Private Endpoint accessible by user with role 'admin'
|
|
5. Correct setup for your application in ZITADEL
|
|
|
|
[API APP Step-By-Step Guide](/docs/examples/secure-api/go)
|