Custom Authentication PAW Extension - paw-app

I was able to create an extension that will create the dynamic Authentication token I needed, but I get some warnings that I've created a self dependancy. I was wondering if there is a way to change the ext type to an authentication one so that it does not have such issues.

Using #Micha's advice worked. My Custom dynamic variable extension that generates an authentication header works and no longer generates warnings.

Related

Spring MVC 5.3 URL Parsing URI Template Variable Problem

I am working with the old Spring Batch Admin project (I know it is no longer supported). I have it working with Spring framework 5.1. I recently upgraded to 5.3.4 and started seeing problems. Spring Batch Admin uses freemarker templates to generate html, json, or rss. Users determine the output by adding an extension to the URL (for example ".json" or ".rss"). The default with no extension is for the html rendering.
The URL parsing changes that is part of 5.3 (https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc) is causing problems. It matches /job/execution/1.json with the right URL /job/execution/{jobid} but the URL template variable is jobid=1.json instead of jobid=1. This causes a problem with the method invocation because it is trying to match a long variable with the string "1.json".
I realize that adding an extension to a URL is not the current approach to returning different results with content types. Anyone have an recommendation for a path forward?
The issue and solution are discussed here. https://github.com/spring-projects/spring-framework/issues/26119

How do I auto sign in to Laravel via an API coming from .net?

We have a portal built in asp.net and we need one of the sections to be an embedded frame containing a webapp built in Laravel, however the Laravel webapp has a login and we dont want users having to login twice. So how do I set this up? I understand I need to use this method :
https://laravel.com/docs/5.4/authentication#authenticating-users
The request would be coming from .net and I would parse say the JSON response, but how do I setup laravel to consume that API call? I have never done anything like this before and I dont know where to start. Can someone explain or give me a series of steps? Thank you!
if you have the user id as $id, you can use:
Auth::loginUsingId($id);

WSO2 5.3.0 Email template is not updating

I am using WSO2IS 5.3.0 version.
I updated all the configs but mistakenly i gave wrong password reset url in [IS_HOME]/repository/conf/email/email-admin-config.xml file. I started my server with RDBMS as datasource. Everything worked well.
Then I noticed my password reset url is wrong. Again I went to [IS_HOME]/repository/conf/email/email-admin-config.xml file and updated the url and restarted WSO2. But it is not working for all the users. Some users still getting old template with wrong url. I restarted my WSO2 multiple times and updated the xml file but no luck. I even tried to change the template through carbon admin UI but still it is sending wrong template.
The weird thing is it is sending right one immediately after i restart WSO2 but after sometimes it start using old template. How can I solve this issue without reconfigure everything from beginning?
Let's me explain how the email-admin-config.xml works. This file works as the bootstrap data required to populate email templates in WSO2 Identity Server. So whenever you create a tenant initial data related to email templates will be read from here.
So we basically read the file during the first startup (ie. creation of carbon.super tenant) and any new tenant creation of the server and write the content to the database. Thereafter any change you want to do needs to be done with the UI provided in the Managment Console.
Restarting the server won't make the changes apply to existing tenants that were created before changes were made to email-admin-config.xml. But if you create a new tenant the updated content will be read from the email-admin-config.xml.
Hope this clarifies your concerns.
Adding to #farasath's answer. You can also use a SOAP service to change the template programmatically. For that, you can use AccountCredentialMgtConfigService. The service contract can be accessed from.
https://<host>:<port>/services/AccountCredentialMgtConfigService?wsdl
However to access the WSDL, you have to set HideAdminServices property to false first at <IS_HOME>/repository/conf/carbon.xml and restart the server.
Also, in the management console, the email template management UI can be found under Manage section on the left side panel.

Get tweets for a user in spring mvc

How to get tweets for a user in spring mvc just like how twitter widget works
I dont want to create application as mentioning in http://spring.io/guides/gs/accessing-twitter/. instead need to read without connecting
Want to read the top tweets for the specified user and need to display in JSP in custom format. Is there any way in spring mvc?
If you are using version 1.0.5 of spring-social-twitter - TwitterTemplate will allow a few simple operations that do not require authorization, such as searching. You need to create an instance of TwitterTemplate without passing in any oauth parameters.
http://docs.spring.io/spring-social-twitter/docs/1.0.5.RELEASE/reference/html/apis.html

A simple GET with Grails

I have built a simple Grails app, with a domain-class and its controller (with the default scaffold functionality).
I want to use this for an Android app.
I had to get my objects in the JSON format, and thanks to stackoverflow it's been easy ;)
Now I have to put data. I should make a POST call to http://localhost:8080/MyApp/person/save with parameters, I suppose. But I can't succeed using RESTClient or other simple utilities/firefox addons that GET/POST data over an HTTP server.
The response web page is an error web page, saying "Property 'name' can't be null" or similar... as if I have no parameters passed. Perhaps I'm not able to make a POST request on a page?! o_O
And how can I enable GET, in Grails, to insert objects?
Thank you.
Funny, I think I am about 2 weeks ahead of you on a similar project. :)
When you do your Post, be sure and include the ?format=json on the end of your URL and grails will automagically parse the params with no extra code in the controller. Isn't grails wonderful?

Resources