How to change text present on swagger authorization screen using springdoc - swagger

I want to change the text present on the swagger authorization UI screen.
I want to change the Authorized label to Stored.
Please find the below screenshot from swagger UI authorization screen
The reason I want to change it as it is miss leading. If the user passes an invalid credential still it is showing as authorized.
Actual validation of Username and password is happening once we execute the request.
I am also good if anyone has an answer to validate the credentials once we hit the Authorize button as shown below.
Note: I am using Spring-boot, Spring security, and springdoc
Any thought or ideas will be appreciated
Thank you !!

sprindoc-openapi project relies on swagger-ui configuration properties and there is no such configuration property in this project:
https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/
You can ask the swagger-ui team, to this kind of configuration property.
If you don't want depend on their tasks priority, you can simply rebbuild the swagger-ui webjars that are available here or use the exploded mode of the webjars, where you can modify the static resources:
https://github.com/swagger-api/swagger-ui

Related

external hyperlink in guidewire policy center

I need to do an hyperlink to an external page in Guidewire Policy Center.
I am using a function in a gsx enhancement file that returns a String with the url according some parameters.
The problem is that I don't know how to use the url to redirect to another page.
As Carlos mentioned you need to create / use an ExitPoint PCF. The documentation is linked in his answer so I won't do it again, however in case it becomes invalid for some reason here's the long and short of it.
You need to create a new PCF file and make of type exitpoint
In there you make an exitPointParameter, fill out the necessary fields, and you're set.
Then you can put your link wherever you want and just put in the action nameOfExitPointPCF.push("http://www.google.com")
You can put other parameters in there, and it'll build it for you, just refer to the documentation.
For really simple external links, there's one called ExternalUrl.pcf that I assume is in the out of the box configuration.
You must create a ExitPoint PCF file. You can read about that in module documentation. Open the page with Firefox...
PolicyCenter/doc/wwhelp/wwhimpl/js/html/wwhelp.htm#href=Configuration Guide/pagefunc.34.4.html

Grails spring-security-oauth-google : how to set up

I have installed the below plugins
compile 'org.grails.plugins:spring-security-core:3.1.1'
compile "org.grails.plugins:spring-security-oauth2:1.1.0"
compile "org.grails.plugins:spring-security-oauth2-google:1.1.0"
Spring security core is working properly.
But I am having issues in implementing the oauth-google authentication.
The plugin documentation says we need to pass the api_key and api_secret. I have created a project in console.developers.google.com and have created the API Key and Oauth Keys, I am confused on which values to use in the application.yml.
Because as per console.developers.google.com the API key and Oauth Key are separate credentials.
Any suggestion on from where to get and how to set the below values would be helpful.
api_key: 'AIzaSyBjfn345tg6j0ol1e89kHMOY'
api_secret: 'xseettDDNtjjuutrfuAFTe4d'
successUri: "/oauth2/google/success"
failureUri: "/oauth2/google/failure"
callback: "/oauth2/google/callback"
scopes: "some_scope"
api_key and api_secret
I took those keys from console.cloud.google.com/
API Manager > Credentials > Create / Edit the entry
then Client ID and Client Secret are the needed values. Other parameters are paths within the Grails app itself, I believe you can change those if you want to override the default behaviour of the plugin.
But there's more ...
Remember about whitelisting your callback address (done on the very same panel). For local connection I set it (on Google API Manager) as
http://localhost:8080/oauth2/google/callback
Remember that apart of calling grails s2-quickstart com.yourapp User Role you need to call also grails init-oauth2 ... (described here - https://github.com/MatrixCrawler/grails-spring-security-oauth2).
Next thing I had to was to override the default login page to be able to display the link mentioned here https://github.com/MatrixCrawler/grails-spring-security-oauth2-google <oauth2:connect provider="google" id="google-connect-link">Google</oauth2:connect>. The default ones are here https://github.com/grails-plugins/grails-spring-security-core/tree/master/grails-app/views/login you just have to copy them to grails-app/views/login/ and modify them.
Next problem was that script from point 2 didn't add static hasMany = [oAuthIDs: OAuthID] field to User domain, which caused the ask view submit to crash.
After that, the Google Oauth2 authentication worked for me.

Showing Task Panes

We have a scenario where we'd like to display a custom URL in an Excel JS Task Pane via an add-in. Specifically, we want to look at a configurable path setting that we'll allow the user to configure and then browse to the appropriate server's page.
From what I've seen, Office locks down the Task Panes pretty decently, I'm not even able to navigate to another page within a task pane and have it re-use the task pane even if I use an anchor tag with a target="_top" or target="_self" attribute.
I'm looking for a way to use JavaScript to perform a ShowTaskPane action or have a variable URL defined in the manifest so depending on some value of a property the user has configured I can route to a dynamically generated URL in the task pane that will then give me user / organizational specific data to insert into the document.
Any ideas?
If you'd like to navigate to a URL in the task pane, define an <AppDomain> element for the URL in the manifest. That should work. https://dev.office.com/docs/add-ins/overview/add-in-manifests#specify-domains-you-want-to-open-in-the-add-in-window
If you cannot define the domain in the <AppDomain> of the app manifest, you can IFrame in the content you want. As long as it supports IFrame-ing
Upadte: After reading the comments on the question I see that you are trying to provide authentication. If the authentication comes from a single set of domains just add them to your manifest and all will be sweet. If the domain changes per auth request you are pretty much out of luck until wildcarded domains are added.

Jira - attempting to make a field NOT REQUIRED

We have an existing text field 'Defect Found Version' (DFV) and a new Field I have created 'Defect Found Version Picker'
I have made the Picker mandatory & that works fine, listing all the cersions on the project.
The DFV field is set to 'Optional' on the right hand side of the Configure Field layout page, however next to the name on the left there is the text REQUIRED & I can not see how to disable this.
Even if I remove this field from all screens I get an error when I create a bug saying that DFV is required.
Any thoughts please ?
Look at the Field Configuration Scheme used by the JIRA project. Then look at the field configuration used for that issue type. That's where it is being made required. Unless it's because of the JIRA Behaviour plugin, so check if that is active
Do you have take a look on your Workflow validator ?
Sometimes, it's required on your workflow, and not on your screen.

Programmatically modify url startpage?

I'd like to modify the page where the user ends up if he isn't recognized.
I'm using a token login system so they're redirected to /c/portal/login by a different system.
I'm having some issues with response.sendRedirect (posted another question for that), so I was hoping I could programmatically modify the url startpage, but so far I haven't found something that has the same function as last_path but then for the startpage in webkeys.
Any input would be appreciated.
Create a hook with a custom "Login Post Action". You'll find some outdated information here (it speaks about the ext-environment, but you should do it in a hook). Liferay IDE or Liferay Developer Studio will help with the generation of such a hook. The code you find in the Wiki should be ok. Otherwise google for more samples (Login Post Action is the keyword: This is code that will be executed just after a successful login)

Resources