iis 网站添加 身份验证_在10分钟内将身份验证添加到任何网页

本文介绍了如何使用Okta服务快速为网页添加身份验证功能,包括创建Okta账户、设置应用程序、创建网页以及利用Okta小部件实现用户登录。Okta能简化身份验证流程,如用户注册、登录、多因素验证等。
摘要由CSDN通过智能技术生成

iis 网站添加 身份验证

This content is sponsored via Syndicate Ads

该内容是通过辛迪加广告 赞助的

Adding authentication to web pages can be pretty annoying.

向网页添加身份验证可能会很烦人。

While I'd like to say that over the course of my programming tenure I've learned to easily add authentication to any app I create, my attempts tend to devolve into me bickering with myself endlessly over a User schema and the most efficient way to share my user data between components.

虽然我想说的是,在我的编程任期内,我学会了轻松地向我创建的任何应用程序添加身份验证,但我的尝试倾向于让我无休止地对自己进行用户模式和最有效的方法争吵。在组件之间共享我的用户数据。

One of the greatest things that's happened in recent years, however, is the proliferation of identity and user management API services like Okta, which handle many of the typical authentication woes for you, including:

但是,近年来发生的最伟大的事情之一就是身份和用户管理API服务的泛滥,例如Okta ,它为您处理了许多典型的身份验证问题,其中包括:

  • User registration

    用户注册
  • User login

    用户登录
  • Multi-factor authentication

    多因素验证
  • Authorization (groups, permissions, etc.)

    授权(组,权限等)
  • Social login

    社交登录

Okta essentially handles all the bullshit you typically need to build when you need to start managing user accounts for your app.

Okta基本上可以处理您需要开始管理应用程序的用户帐户时通常需要构建的所有废话。

So, with that in mind, today I'm going to show you how to easily add authentication to any web page in 10 minutes.

因此,考虑到这一点,今天我将向您展示如何在10分钟内轻松将身份验证添加到任何网页。

创建一个Okta帐户 ( Create an Okta Account )

The first thing you'll need to do is create a free Okta developer account.

您需要做的第一件事是创建一个免费的Okta开发人员帐户

Once you've got your shiny new Okta account and you've logged into the dashboard, you need to open a new file and copy down the Org URL from the top-right portion of the page.

获得闪亮的Okta新帐户并登录到信息中心后,您需要打开一个新文件并从页面右上方复制组织URL

Okta Org URL

NOTE: If you were curious about how I was going to teach you to add authentication to any web page in 10 minutes: I'm going to cheat. I'm going to show you how to do it using Okta which makes the entire process thoughtless. If I wanted to show you how to add authentication into any web page without using something like Okta, it would take me about two full days. I'd have to explain sessions, JSON Web Tokens, OpenID Connect, database schema design, database management, API patterns (to expose the users), and much more.

注意 :如果您对我将如何教您如何在10分钟内将身份验证添加到任何网页感到好奇: 我将作弊 。 我将向您展示如何使用Okta做到这一点,这会使整个过程变得毫无思想。 如果我想向您展示如何在使用Okta之类的情况下向任何网页添加身份验证,则大约需要整整两天的时间。 我必须解释会话, JSON Web令牌OpenID Connect ,数据库模式设计,数据库管理,API模式(向用户公开)等等。

创建Okta应用程序 ( Create an Okta Application )

The next thing you need to do is create an Okta Application. Okta allows you to secure as many different websites, mobile apps, and API services as you want, so you'll need to create an Application for each so you know which users can log into which apps. To do this, click the Applications tab at the top of the screen and then create Add Application.

接下来需要做的是创建Okta应用程序。 Okta允许您保护所需的许多不同的网站,移动应用程序和API服务,因此您需要为每个网站创建一个应用程序,以便知道哪些用户可以登录哪些应用程序。 为此,请单击屏幕顶部的“ 应用程序”选项卡,然后创建“ 添加应用程序”

Okta Create App

Once you've reached the app creation page, you'll want to select the Single-Page App box (because I'm going to show you how to quickly add authentication to a single-page web app), then click Next. To finish creating the app, you'll want to then fill in the following values:

到达应用程序创建页面后,您将需要选择Single-Page App框(因为我将向您展示如何快速向单页Web应用程序添加身份验证),然后单击Next 。 要完成创建应用程序,您需要填写以下值:

  • Name: The name of your app.

    名称 :您的应用程序的名称。
  • Base URIs: The URLs that your app will run under. For instance, the app I'm going to secure in this guide will run on localhost port 8080, so I'll leave the default value of http://localhost:8080 alone. If my website were running as https://www.coolsite.com, I'd use that value instead. You can have as many Base URI values as you need.

    基本URI :您的应用将在其下运行的URL。 例如,本指南中要保护的应用程序将在localhost端口8080上运行,因此我将保留默认值http://localhost:8080 。 如果我的网站以https://www.coolsite.com身份运行,那么我将使用该值。 您可以根据需要具有任意多个基本URI值。
  • Login Redirect URIs: The URLs that your app should redirect back to once a user has authenticated. For 99% of you, this should be the same value as the Base URI.

    登录重定向URI :用户通过身份验证后,您的应用应重定向回的URL。 对于您中的99%,此值应与基本URI相同。

Once you've got all the settings specified, click Done to create your new app.

指定所有设置后,请单击“完成”以创建新应用。

The last thing you'll need to do is scroll down to the bottom of your newly created app page and copy down the Client ID value. This is your app's unique OpenID Connect client identifier. It isn't important that you understand what that is yet, but it is important that you copy th

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值