flipp5b / telegram-bot-oidc

Telegram Bot with OpenId Connect authentication. Demo project.

Home Page:https://habr.com/ru/post/488390/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telegram Bot with OpenId Connect authentication

This project demonstrates how to implement authentication in Telegram bot using OpenId Connect (OIDC).

Implementation tools:

This demo comprises of two services:

  • Telegram bot
  • OpenId provider

Building

Ensure you have JDK 11. To build the project run:

./mvnw package

Running

Ensure you have Docker and Docker Compose installed.
Create file .env in project root directory using .env.template as a base. Specify correct values for the following entries:

  • BASEURL: http://address:8080 where address is an IP address/domain name of your host.
  • OIDC_KEYCLOAK_BASEURL: http://address:8180 where address is an IP address/domain name of your host (do not use localhost).
  • BOT_USERNAME: name of your telegram bot.
  • BOT_TOKEN: token of your telegram bot.

Ok. Now, run the demo using following command:

docker-compose up --build

About

Telegram Bot with OpenId Connect authentication. Demo project.

https://habr.com/ru/post/488390/


Languages

Language:Java 99.0%Language:Dockerfile 1.0%