Skip to content

Instantly share code, notes, and snippets.

AkilliSehir OpenID + Next.js Auth Rehberi

Bu dokuman, bu projede calisan kimlik dogrulama mimarisini birebir anlatir ve ayni yaklasimi yeni Next.js projelerine tasimak icin hazirlanmistir. Tüm kod örnekleri bu projenin gerçek çalışan kodudur.

Kapsam:

  • NextAuth v5 (beta) + OIDC provider entegrasyonu
  • JWT tabanli session yonetimi
  • Access token suresi kontrolu ve refresh token akisi
  • Refresh token ile proaktif oturum yenileme
  • Oturum uzatma toast bildirimi

Next.js + OpenID Connect (OpenIddict) Entegrasyon Kılavuzu

Sivas Belediyesi Akıllı Şehir SSO altyapısı ile Next.js projelerinin entegrasyonu için adım adım rehber.
Bu kılavuz, yaşanan sorunlar ve çözümleriyle birlikte hazırlanmıştır.


1. Ön Koşullar

| Bileşen | Minimum Versiyon | Not |

# -*- coding: utf-8 -*-
from qgis.PyQt.QtCore import QCoreApplication
from qgis.core import (QgsProcessing,
QgsProcessingAlgorithm,
QgsProcessingParameterVectorLayer,
QgsProcessingParameterField,
QgsProcessingParameterFolderDestination,
QgsProcessingParameterBoolean,
QgsProcessingParameterCrs,
from django.core.management.base import BaseCommand
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
import re
VERB_MAP = {
'add': 'Ekleyebilir',
'change': 'Düzenleyebilir',
'delete': 'Silebilir',
'view': 'Görüntüleyebilir',
@mcihad
mcihad / build.gradle
Created August 26, 2025 05:29
KPS Servislerini java ile sorgulama, Kimlik Doğrulama Servisi için geçerli sadece
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.5'
id 'io.spring.dependency-management' version '1.1.7'
id "com.github.bjornvester.wsdl2java" version "2.0.2"
}
dependencies {
[package]
name = "deneme"
version = "0.1.0"
edition = "2024"
[dependencies]
handlebars = "6.3.2"
rocket = "0.5.1"
# Build profile tweaks to speed up iteration and improve release build throughput.
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8" />
<title>{{name}} template</title>
</head>
<body>
<h1>Merhaba, bu {{name}} şablonu</h1>
use rocket::http::Status;
use rocket::response::content::RawHtml;
use rocket::tokio::time::{Duration, sleep};
#[macro_use]
extern crate rocket;
use std::collections::HashMap;
#[get("/")]
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using Microsoft.IdentityModel.Tokens;
using System.Reflection;
using System.Security.Claims;
using Microsoft.EntityFrameworkCore;
using Sivasbeltr.WorkCollab.Web.Data;
from qgis.core import *
from qgis.gui import *
@qgsfunction(group='Custom', referenced_columns=[])
def get_park_id(geometry):
layer = QgsProject.instance().mapLayersByName('Parklar')[0] # "Parklar" katmanını al
for feature in layer.getFeatures():
if feature.geometry().intersects(geometry): # Kesişen parkı bul
return feature['id'] # Parkın id'sini döndür
return None # Kesişen park yoksa NULL döndür