umbraco-authu | Umbraco plugin to add an OAuth API endpoint | OAuth library
kandi X-RAY | umbraco-authu Summary
kandi X-RAY | umbraco-authu Summary
An Umbraco plugin to add an OAuth API endpoint to allow authenticated Members/Users via OAuth
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of umbraco-authu
umbraco-authu Key Features
umbraco-authu Examples and Code Snippets
Request URL:
POST https://mydomain.com/oauth/token
Request Headers:
Content-Type: application/x-www-form-urlencoded
Request POST Body:
grant_type=password&username=joebloggs&password=password1234&client_id=myclient&client_secret
public class AuthUConfigComponent : IComponent
{
public void Initialize()
{
// Configuration goes here
}
public void Terminate() { }
}
public class AuthUConfigComposer : ComponentComposer
OAuth.ConfigureEndpoint("realm", "/oauth/token", new OAuthOptions {
UserService = new UmbracoMembersOAuthUserService(),
SymmetricKey = "856FECBA3B06519C8DDDBC80BB080553",
AccessTokenLifeTime = 20, // Minutes
Client
Community Discussions
Trending Discussions on umbraco-authu
QUESTION
Request URL:
POST https://example.com/oauth/token
Request Headers:
Content-Type: application/x-www-form-urlencoded
Request POST Body:
grant_type=password&username=joebloggs&
password=password1234&client_id=myclient&client_secret=myclientsecret
Response:
{
"access_token": "omitted for brevity",
"token_type": "bearer",
"expires_in": 1200,
"refresh_token": "b3cc9c66b86340c5b743f2a7cec9d2f1"
}
...ANSWER
Answered 2018-Jan-21 at 18:18There are 2 main reasons to request a token with a username and password and then storing that token on the requesting end.
- Extra security. A username/password combo is not send with every request but only once every 1200 seconds/minutes.
- The server handling the request only needs to check the validity of the token instead of a performance heavy password hash for every request.
There are other reasons as well, please see the links below.
- https://stormpath.com/blog/token-authentication-scalable-user-mgmt
https://www.w3.org/2001/sw/Europe/events/foaf-galway/papers/fp/token_based_authentication/
- https://security.stackexchange.com/questions/151770/token-based-api-security-over-repeated-username-password-requests
- What is token based authentication?
Update
The client_id is a public identifier for apps. The client_secret is a secret known only to the application and the authorization server. More info in the following links.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install umbraco-authu
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page