Getting Scope Validating error in Identity Server 4 using JavaScript Client in asp.net core

While your client (application) is configured or allowed to request the openid resource (or scope), your identity server is not configured for the openid identity resource You need to add it as an identity resource similar to how its done here and have a method that returns all your identity resources that you want to … Read more

OAuth or JWT? Which one to use and why?

JWT is a simple authentication protocol, Oauth is an authentication framework. An experienced developer will take about a month to fully understand and implement Oauth. An experienced developer can pick up the JWT protocol in about a day of reading the specifications. So basically, it boils down to your specific use-case. If you want simple … Read more

how to use github api token in python for requesting

Here’s some code that might help you out. Examples: Example 1 (auth): username=”user” token = ‘token’ login = requests.get(‘https://api.github.com/search/repositories?q=github+api’, auth=(username,token)) Example 2 (headers): headers = {‘Authorization’: ‘token ‘ + token} login = requests.get(‘https://api.github.com/user’, headers=headers) print(login.json()) Example 3 (delete repo): user=”username” repo = ‘some_repo’ # Delete this repo headers = {‘Authorization’: ‘token ‘ + token} login … Read more

Angular 4 – setting withCredentials on every request – cors cookie

You can use an HttpInterceptor. @Injectable() export class CustomInterceptor implements HttpInterceptor { constructor() { } intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { request = request.clone({ withCredentials: true }); return next.handle(request); } } Next you have to provide it: @NgModule({ bootstrap: [AppComponent], imports: […], providers: [ { provide: HTTP_INTERCEPTORS, useClass: CustomInterceptor , multi: true } ] }) … Read more

Access to Google API – GoogleAccountCredential.usingOAuth2 vs GoogleAuthUtil.getToken()

The Google APIs Client Library for Java is as the name suggests a library for accessing Google APIs and it is available for several platforms such as Java (in general) and Android while the Google Play Services and GoogleAuthUtil is only available on Android. By looking at the wiki page of the project it is … Read more

Error: invalid_request device_id and device_name are required for private IP

An alternative to editing a hosts file is to use the “Magic DNS” service https://nip.io/ nip.io is a magic domain name that provides wildcard DNS for any IP address. Say your LAN IP address is 10.0.0.1: 10.0.0.1.nip.io resolves to 10.0.0.1 (dot syntax) 192-168-1-250.nip.io resolves to 192.168.1.250 (dash syntax) 0a000803.nip.io resolves to 10.0.8.3 (hex syntax) foo.bar.10.0.0.1.nip.io … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)