How to setup Authentication with ApiGility - laminas-api-tools

I am attempting to setup Authentication with ApiGility.
I have added a Login route, and when I access this route with no authentication in place I am expecting to receive:
{
"type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
"title": "Forbidden",
"status": 403,
"detail": "Forbidden"
}
As I do on my other ApiGility app.
However when I attempt to access the end point it is readily available despite having set Authentication.
Is there something that can affect this?
Here are some screenshots of my settings:
End point for login:
Fields
Authorized methods
Login Method - just returns true for now
Authentication setup

I updated ApiGility via composer and it started to work.

Related

Mesibo Dashboard becomes inaccessible after API call fail

I am trying to create a new user through the backend.
My backend is a spring-boot application Java-based.
The API call end with a JSON object and have the result key set to false, with no other information to understand why the user has not been created. And then, when I tried to refresh the Mesibo dashboard, I got an empty page, with errors in the browser console.
This the user I try to save in Mesibo.
{
"op": "useradd",
"token": "I put here my app token",
"user": {
"address": "newuser#email.com",
"name": "User Name",
"token": {
"appid": "com.fake.id"
}
}
}
The image shows what I see in the browser console when I try to access It.
mesibo browser console
It is important to note, that the account I use is not mine, I use the one my company gave me.
We are trying to implement our flow, so we are not in prod we are just testing APIs and others...
Thank you very much for your help!
Anas
PS: I created my own account on mesibo and got the same result!

Firebase Authentication unable to enable Google auth method - "Error updating Google"

I am trying to enable the Firebase authentication with the Google Auth sign-in method, but enabling it and clicking "save" shows the error "Error updating Google".
In the Google Cloud Console activity logs, it shows:
Failed:google.internal.firebase.v1.FirebaseInternalProductService.EnableGoogleSignIn
With the error message "Not found (HTTP 404): Operation failed with error code NOT_FOUND."
However, when I tried this in a new Google Cloud project, it worked perfectly. I have tried removing and recreating the Firebase Admin SDK, removing and creating a new app, and removing the OAuth credentials.
I cannot seem to find any solution to this problem other than creating a new project, but I would prefer to keep my existing project ID.
Alternatively, if there is any way to reset my GCP project or remake it with the same ID, that would also be fine.
This issue is caused by deleting the OAuth client autogenerated by Firebase by default.
To solve it, you need to first create a new OAuth 2 client ID, and set the necessary redirect URIs for your Firebase app (they should default to something like https://{PROJECT_ID}.web.app/__/auth/handler).
Then, call this API - the request should look something like this, using the client ID and client secret from the credentials generated above:
PATCH https://identitytoolkit.googleapis.com/admin/v2/projects/{PROJECT_ID}/defaultSupportedIdpConfigs/google.com
{
"name": "projects/{PROJECT_ID}/defaultSupportedIdpConfigs/google.com",
"enabled": true,
"clientId": "{YOUR_CLIENT_ID}",
"clientSecret": "{YOUR_CLIENT_SECRET}"
}
After making this API call, the Google authentication provider should be enabled.
Before to begin, you must have created a new oaut-credentian gcp console, because is tha main problem here.
You nee create a new oauth provider, you can use the next link to authenticate a try the request using data like next:
Parent: projects/**put here your project number**
idpId (identity provider): google.com
Request Body
{
"name": "projects/**put here your project number**/defaultSupportedIdpConfigs/google.com",
"enabled": true,
"clientId": "**put here your client id**",
"clientSecret": "**put here your client secret**"
}

Is that possible to add android app to firebase project programmatically using firbase cloud function

Is there any method to add a android app to exiting firebase project programmatically and i need the google-services.json as result then i need to add sha key with that same app using node-js
online documentation not solve my problem or i don't understand how to do it from that documentation
Thankyou for your answer i flowed it and facing another issue
#admin and #Frank van Puffelen please check
when i try to create android it showing this error.
{ "error": { "code": 400, "message": "Request contains an invalid argument.", "status": "INVALID_ARGUMENT" } }
I send post request from live api test window
and in parent i set it as `projects/343202254462`
{ "displayName": "testing", "name": "te4sting", "packageName": "io.asdasd.fdsfdsf", "projectId": "324324324", "appId": "wdeqwe" }
There is a REST api, Firebase Management API, which lets you control the apps connected and other such admin work. Friendly note, make sure you restrict all client api keys from using this api!
REST Resource: v1beta1.projects.androidApps
create POST /v1beta1/{parent=projects/*}/androidApps

Not permitted to execute user plugin on Artifactory Pro

I have written a user plugin for Artifactory.
However when I want to execute it I get this error:
{
"errors": [
{
"status": 405,
"message": "You are not permitted to execute 'cleanUpPlugin'."
}
]
}
This error occurs whether I use the admin account or don't use Basic Auth at all.
What do I have to do to be allowed to execute the plugin?
I had to use the correct HTTP method (default is POST) to get the request working.

How to get Access token via HTTP action in Flow

I'm trying to authenticate against an App Service that I have defined in Azure Active Directory. When accessing it, I first get the access token and the continue with the rest of the OAuth procedure.
The problem, however, is that I can only get the token when posting the request via Postman. When I try to call the same URL, with the same data using an HTTP action in flow, it fails:
{
"error": "invalid_client",
"error_description": "AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.\r\nTrace ID: 67250fbf-ad20-47f1-b3a3-dbce1e813600\r\nCorrelation ID: f9eaaa13-cee3-4f5c-a96a-6846c4392dd9\r\nTimestamp: 2018-01-17 12:21:51Z",
"error_codes": [
70002,
50012
],
"timestamp": "2018-01-17 12:21:51Z",
"trace_id": "67250fbf-ad20-47f1-b3a3-dbce1e813600",
"correlation_id": "f9eaaa13-cee3-4f5c-a96a-6846c4392dd9"
}
This is how it is set up in Flow:
When executed in Postman it works just fine:
I cannot figure out why this doesn't work when running the request from within a Flow. Am I missing something in the HTTP action card configuration?
Kind regards,
Peter
I found the reason for this not working. I had to fully URL encode the value for client_secret.
/Peter

Resources