Skip to content
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

docs: improve NuGet instructions #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 5 additions & 9 deletions getting-started/nuget-sso.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
title: Using Telerik NuGet with SSO Account
title: Generating and Using Telerik NuGet Key
description: Learn how to use API keys for authentication with the Telerik NuGet server when you have an SSO account and cannot use a username and password.
slug: telerik-nuget-sso
position: 100
publish: false
---


# Using Telerik Nuget with Single Sign-On

# Generating and Using Telerik NuGet Key

Progress Telerik expanded the account sign-in and login options, and now you can create a Telerik account through Google Authentication or by using custom SSO providers. While that change aims to ease the accessibility and usage of the whole Telerik system, it also presents a challenge for those who want to use a NuGet library through the Telerik NuGet server.

## Why and How to use a NuGet Key

Some Telerik products (like [FiddlerCore](https://docs.telerik.com/fiddlercore/getting-started/telerik-nuget-server) or [Kendo UI](https://docs.telerik.com/kendo-ui/intro/installation/nuget-install)) are available through the Telerik NuGet server which requires authentication. Until recently, you could only use your Telerik account's credentials to authenticate with the Telerik NuGet server. However, a Telerik account that uses Google Authentication or custom SSO will notice no direct SSO login option to access the NuGet servers, and entering a username & password is a no-go. Luckily, the Progress Telerik team developed NuGet keys which can be used instead of the conventional username & password paradigm.
The main reason is that you can quickly and efficiatenly set your NeGut key within the application configuration and forget about Nuget credentials.

Additionally, some Telerik products (like [FiddlerCore](https://docs.telerik.com/fiddlercore/getting-started/telerik-nuget-server) or [Kendo UI](https://docs.telerik.com/kendo-ui/intro/installation/nuget-install)) are available through the Telerik NuGet server which requires authentication. Until recently, you could only use your Telerik account's credentials to authenticate with the Telerik NuGet server. However, a Telerik account that uses Google Authentication or custom SSO will notice no direct SSO login option to access the NuGet servers, and entering a username & password is a no-go. Luckily, the Progress Telerik team developed NuGet keys which can be used instead of the conventional username & password paradigm.

>tip NuGet keys are helpful not only for Telerik users with Google Auth or SSO accounts but also for CI users and desktop developers. Learn more about the NuGet keys and how to use them by reading [this excellent blog post by Lance McCarthy](https://www.telerik.com/blogs/announcing-nuget-keys).

Expand All @@ -30,14 +29,12 @@ Generating a key for the Telerik NuGet server (https://nuget.telerik.com/v3/inde

![Generate new key](./images/nuget-keys-telerik-001.png)


### Using the NuGet Key for Authentication

Instead of entering a username and password through a Visual Studio prompt or a CLI command, the NuGet key must be provided through the NuGet.Config file.

You have the option to create a NuGet.Config file on the application level (it will overwrite any global NuGet.Config files and configuration will be applicable only for the specific application) or to use a global NuGet.Config file (it will be valid for all applications unless explicitly overwritten by an application NuGet.Config file). [Learn more details about NuGet.Config configuration and location on each operating system here...](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior)


1. Close all instances of Visual Studio.

1. Navigate to the directory where the NuGet.Config file resides. [Learn where is the location of NuGet.Config on each operating system here...](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses)
Expand Down Expand Up @@ -71,7 +68,6 @@ You have the option to create a NuGet.Config file on the application level (it w

>Always use the `ClearTextPassword` option (not `Password`). Note that while you can directly copy/paste the Telerik NuGet key, it is not a good practice in terms of security. You can learn how to protect your API key from [Lance's blog post on NuGet keys](https://www.telerik.com/blogs/announcing-nuget-keys).


1. Re-open your .NET application in Visual Studio and restore the NuGet packages.

That's it! With the above configuration in place, you can now access the Telerik NuGet and download & install the needed libraries without entering credentials.
44 changes: 7 additions & 37 deletions getting-started/telerik-nuget-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ position: 8

# Telerik NuGet Server

The following steps demonstrate how users can take advantage of **Telerik NuGet server** in order to include our suite in their solution and/or update to the latest available version.
The following steps demonstrate how users can use the Telerik NuGet server to include our suite in their solution and/or update to the latest available version.

>important The credentials needed to access Telerik Nuget server are the same you use to log into your [Telerik account](https://www.telerik.com/account).
The credentials needed to access the Telerik NuGet server are the same as you use to log into your [Telerik account](https://www.telerik.com/account). The recommended approach to authenticate is to [generate]({%slug telerik-nuget-sso%}#generating-a-nuget-key) and [use]({%slug telerik-nuget-sso%}#using-the-nuget-key-for-authentication) the Telerik NuGet key.

## Visual Studio

The first step is to add the Telerik server to the NuGet package sources. This can be done in the Package Manager Settings from the Tools menu.

![](images/nuget-server/nuget-vs-pm-settings.png)

In the the Package Sources section users can add new sources.
In the Package Sources section, users can add new sources.

![](images/nuget-server/nuget-vs-add-source.png)

In the Source field users should fill in the address of the Telerik server (URL: **https://nuget.telerik.com/v3/index.json**) and click the Update button.
In the Source field, users should fill in the address of the Telerik server (URL: **https://nuget.telerik.com/v3/index.json**) and click the Update button.

>important The previous version of the Telerik NuGet server (https://nuget.telerik.com/nuget) will be deprecated. Update your settings to point to the new v3 API (URL: **https://nuget.telerik.com/v3/index.json**), which is faster, lighter, and reduces the number of requests from NuGet clients.

Expand All @@ -41,40 +41,11 @@ Users have to find the **FiddlerCore** package and install it to their projects

![](images/nuget-server/nuget-vs-add-packages.png)

Now the user's solution has all required Telerik assemblies.

## Visual Studio for Mac

Users first have to add the Telerik NuGet server in their packages sources list. This can be done by clicking on the settings icon of any “*Packages*” folder (any project will do the job) and choosing “*Add Packages…*”.

![Add Packages](images/getting-started-add-packages-menu.png "Add Packages")

This will open another dialog. Users need to choose “*Configure Sources…*” option from the dropdown in the upper right corner.


![Configure Sources](images/getting-started-configure-sources.png "Configure Sources")

On the next dialog users will see all the available sources. Choose “*Add*” to add the new server.

![Add Telerik NuGet server](images/getting-started-add-package-source.png "Add Telerik NuGet server")

In the Add Package Source dialog users should fill in the information of the Telerik server (URL: **https://nuget.telerik.com/v3/index.json**) as well as their private Telerik credentials. Authentication procedure is required in order to allow downloading the packs.

>important The previous version of the Telerik NuGet server (https://nuget.telerik.com/nuget) will be deprecated. Update your settings to point to the new v3 API (URL: **https://nuget.telerik.com/v3/index.json**), which is faster, lighter, and reduces the number of requests from NuGet clients.

![Telerik NuGet server details](images/getting-started-add-telerk-server.png "Telerik NuGet server details")

After the Telerik NuGet server is added users will be able to see the packages they are allowed to download in the Add Packages dialog. This will allow them to check the **FiddlerCore** pack and add it into their projects.

#### Add FiddlerCore pack

Once the server is added users will be able to add to their projects any of the **Telerik NuGet** packages available for their license. One click on the settings icon of the “*Packages*” folder of any project will open the **Add Packages** dialog where the available Telerik packs will be listed.

![Telerik NuGet packages](images/getting-started-add-packages-dialog.png "Telerik NuGet packages")
>tip You will need to autheticate when usiong the Telerik NuGet server. The recommended approach is to [generate and use a Telerik NuGet key]({%slug telerik-nuget-sso%}).

## Troubleshooting

#### '401 Logon failed' error
#### Receiving 401 Logon failed Error

If you're receiving this error when connecting to Telerik Nuget Server, you could try to update your NuGet credentials through the Windows Credential Manager. Please follow the steps below:

Expand All @@ -84,8 +55,7 @@ If you're receiving this error when connecting to Telerik Nuget Server, you coul
1. Once you find that entry, expand it and select "edit";
1. Make sure the username and password are the same ones you use for your Telerik account (use the Email in the place of username) and click "Save".

Now you can reopen Visual Studio and access the Telerik NuGet server.

Now, you can reopen Visual Studio and access the Telerik NuGet server.

## Next Steps

Expand Down