This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DynamicMongoClientFactory { | |
| public DynamicMongoClientFactory() {} | |
| public MongoClient createMongoClient(String uri) { | |
| StandardMongoClientSettingsBuilderCustomizer standardMongoClientSettingsBuilderCustomizer = new StandardMongoClientSettingsBuilderCustomizer(new ConnectionString(uri), UuidRepresentation.JAVA_LEGACY, new MongoProperties.Ssl(), new DefaultSslBundleRegistry()); | |
| MongoClientSettings mongoClientSettings = MongoClientSettings | |
| .builder() | |
| .applicationName("user") | |
| .applyConnectionString(new ConnectionString(uri)).build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.crypto.BadPaddingException; | |
| import javax.crypto.Cipher; | |
| import javax.crypto.IllegalBlockSizeException; | |
| import javax.crypto.NoSuchPaddingException; | |
| import javax.crypto.SecretKeyFactory; | |
| import javax.crypto.spec.GCMParameterSpec; | |
| import javax.crypto.spec.PBEKeySpec; | |
| import javax.crypto.spec.SecretKeySpec; | |
| import java.security.InvalidAlgorithmParameterException; | |
| import java.security.InvalidKeyException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TODO: needs a better typing for Recoil | |
| type AtomEffectParams = { | |
| // eslint-disable-next-line | |
| [key: string]: any; | |
| }; | |
| export type { AtomEffectParams }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { OptionsObject, SnackbarKey, SnackbarMessage } from 'notistack'; | |
| interface Notification { | |
| message: SnackbarMessage; | |
| options: OptionsObject; | |
| dismissed: boolean; | |
| } | |
| type Actions = { | |
| push: (notification: Partial<Notification>) => SnackbarKey; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { SnackbarProvider } from 'notistack'; | |
| import { notifications } from '@/config'; | |
| import Notifier from './Notifier'; | |
| const Notification: React.FC = () => { | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { chakra, ThemingProps, useStyleConfig } from '@chakra-ui/react' | |
| import NextImage, { ImageProps as NextImageProps } from 'next/image' | |
| import { ReactElement } from 'react' | |
| import { Sizes } from '../../theme/variables/image' | |
| // TODO review props when NextJs is updated so we don't have to defined it here | |
| /** | |
| * ? Because NextJs typing is preventing auto-suggest for layout, width and height, | |
| * ? we declare the styles differently in this component and will manage the switch | |
| * ? to NextJs typings when calling NextJs `next/image` component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.robsonkades.platform.authorization.cache; | |
| import java.nio.charset.StandardCharsets; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Optional; | |
| import java.util.Set; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| import java.util.concurrent.ConcurrentSkipListSet; | |
| import java.util.concurrent.ExecutorService; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AppProps } from 'next/app'; | |
| import { RecoilRoot } from 'recoil'; | |
| export function withRecoil<T extends AppProps = AppProps>( | |
| WrappedComponent: React.ComponentType<T> | |
| ) { | |
| const displayName = | |
| WrappedComponent.displayName || WrappedComponent.name || 'Component'; | |
| const Component = (props: Omit<T, keyof AppProps>) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package br.com.kades.robson.configuration; | |
| import static org.apache.commons.collections4.CollectionUtils.emptyIfNull; | |
| import static org.apache.commons.lang3.ObjectUtils.defaultIfNull; | |
| import java.util.Arrays; | |
| import javax.annotation.PostConstruct; | |
| import javax.inject.Inject; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package br.com.kades.robson.configuration; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import org.modelmapper.ModelMapper; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import lombok.AccessLevel; |