.getName() + ".DataSourceConfiguration$")) { return ConditionOutcome .match(message.foundExactly("auto-configured DataSource"));
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT Condition"); Environment environment = context.getEnvironment(); String keyValue = environment .getProperty("security.oauth2.resource.jwt.key-value"); String keyUri = environment .getProperty("security.oauth2.resource.jwt.key-uri"); if (StringUtils.hasText(keyValue) || StringUtils.hasText(keyUri)) { return ConditionOutcome .match(message.foundExactly("provided public key")); } return ConditionOutcome .noMatch(message.didNotFind("provided public key").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT Condition"); Environment environment = context.getEnvironment(); String keyValue = environment .getProperty("security.oauth2.resource.jwt.key-value"); String keyUri = environment .getProperty("security.oauth2.resource.jwt.key-uri"); if (StringUtils.hasText(keyValue) || StringUtils.hasText(keyUri)) { return ConditionOutcome .match(message.foundExactly("provided public key")); } return ConditionOutcome .noMatch(message.didNotFind("provided public key").atAll()); }
return ConditionOutcome.match(message.foundExactly("client-id property")); if (binder.bind(prefix + "jwt", STRING_OBJECT_MAP).isBound()) { return ConditionOutcome .match(message.foundExactly("JWT resource configuration")); .match(message.foundExactly("JWK resource configuration")); .match(message.foundExactly("user-info-uri property")); .match(message.foundExactly("token-info-uri property"));
return ConditionOutcome.match(message.foundExactly("client-id property")); if (binder.bind(prefix + "jwt", STRING_OBJECT_MAP).isBound()) { return ConditionOutcome .match(message.foundExactly("JWT resource configuration")); .match(message.foundExactly("JWK resource configuration")); .match(message.foundExactly("user-info-uri property")); .match(message.foundExactly("token-info-uri property"));
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth TokenInfo Condition"); Environment environment = context.getEnvironment(); Boolean preferTokenInfo = environment.getProperty( "security.oauth2.resource.prefer-token-info", Boolean.class); if (preferTokenInfo == null) { preferTokenInfo = environment .resolvePlaceholders("${OAUTH2_RESOURCE_PREFERTOKENINFO:true}") .equals("true"); } String tokenInfoUri = environment .getProperty("security.oauth2.resource.token-info-uri"); String userInfoUri = environment .getProperty("security.oauth2.resource.user-info-uri"); if (!StringUtils.hasLength(userInfoUri) && !StringUtils.hasLength(tokenInfoUri)) { return ConditionOutcome .match(message.didNotFind("user-info-uri property").atAll()); } if (StringUtils.hasLength(tokenInfoUri) && preferTokenInfo) { return ConditionOutcome .match(message.foundExactly("preferred token-info-uri property")); } return ConditionOutcome.noMatch(message.didNotFind("token info").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth TokenInfo Condition"); Environment environment = context.getEnvironment(); Boolean preferTokenInfo = environment.getProperty( "security.oauth2.resource.prefer-token-info", Boolean.class); if (preferTokenInfo == null) { preferTokenInfo = environment .resolvePlaceholders("${OAUTH2_RESOURCE_PREFERTOKENINFO:true}") .equals("true"); } String tokenInfoUri = environment .getProperty("security.oauth2.resource.token-info-uri"); String userInfoUri = environment .getProperty("security.oauth2.resource.user-info-uri"); if (!StringUtils.hasLength(userInfoUri) && !StringUtils.hasLength(tokenInfoUri)) { return ConditionOutcome .match(message.didNotFind("user-info-uri property").atAll()); } if (StringUtils.hasLength(tokenInfoUri) && preferTokenInfo) { return ConditionOutcome .match(message.foundExactly("preferred token-info-uri property")); } return ConditionOutcome.noMatch(message.didNotFind("token info").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT KeyStore Condition"); Environment environment = context.getEnvironment(); String keyStore = environment .getProperty("security.oauth2.resource.jwt.key-store"); if (StringUtils.hasText(keyStore)) { return ConditionOutcome .match(message.foundExactly("provided key store location")); } return ConditionOutcome .noMatch(message.didNotFind("key store location not provided").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWK Condition"); Environment environment = context.getEnvironment(); String keyUri = environment .getProperty("security.oauth2.resource.jwk.key-set-uri"); if (StringUtils.hasText(keyUri)) { return ConditionOutcome .match(message.foundExactly("provided jwk key set URI")); } return ConditionOutcome .noMatch(message.didNotFind("key jwk set URI not provided").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT Condition"); Environment environment = context.getEnvironment(); String keyValue = environment .getProperty("security.oauth2.authorization.jwt.key-value"); if (StringUtils.hasText(keyValue)) { return ConditionOutcome .match(message.foundExactly("provided private or symmetric key")); } return ConditionOutcome .noMatch(message.didNotFind("provided private or symmetric key").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { String clientId = context.getEnvironment() .getProperty("security.oauth2.client.client-id"); ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth Client ID"); if (StringUtils.hasLength(clientId)) { return ConditionOutcome.match(message .foundExactly("security.oauth2.client.client-id property")); } return ConditionOutcome.noMatch(message .didNotFind("security.oauth2.client.client-id property").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT Condition"); Environment environment = context.getEnvironment(); String keyValue = environment .getProperty("security.oauth2.authorization.jwt.key-value"); if (StringUtils.hasText(keyValue)) { return ConditionOutcome .match(message.foundExactly("provided private or symmetric key")); } return ConditionOutcome.noMatch( message.didNotFind("provided private or symmetric key").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT KeyStore Condition"); Environment environment = context.getEnvironment(); String keyStore = environment .getProperty("security.oauth2.resource.jwt.key-store"); if (StringUtils.hasText(keyStore)) { return ConditionOutcome .match(message.foundExactly("provided key store location")); } return ConditionOutcome.noMatch( message.didNotFind("key store location not provided").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWK Condition"); Environment environment = context.getEnvironment(); String keyUri = environment .getProperty("security.oauth2.resource.jwk.key-set-uri"); if (StringUtils.hasText(keyUri)) { return ConditionOutcome .match(message.foundExactly("provided jwk key set URI")); } return ConditionOutcome .noMatch(message.didNotFind("key jwk set URI not provided").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { String clientId = context.getEnvironment() .getProperty("security.oauth2.client.client-id"); ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth Client ID"); if (StringUtils.hasLength(clientId)) { return ConditionOutcome.match(message .foundExactly("security.oauth2.client.client-id property")); } return ConditionOutcome.noMatch(message .didNotFind("security.oauth2.client.client-id property").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT KeyStore Condition"); Environment environment = context.getEnvironment(); String keyStore = environment .getProperty("security.oauth2.authorization.jwt.key-store"); if (StringUtils.hasText(keyStore)) { return ConditionOutcome .match(message.foundExactly("provided key store location")); } return ConditionOutcome .noMatch(message.didNotFind("provided key store location").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage .forCondition("OAuth JWT KeyStore Condition"); Environment environment = context.getEnvironment(); String keyStore = environment .getProperty("security.oauth2.authorization.jwt.key-store"); if (StringUtils.hasText(keyStore)) { return ConditionOutcome .match(message.foundExactly("provided key store location")); } return ConditionOutcome .noMatch(message.didNotFind("provided key store location").atAll()); }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage.forCondition("Okta Api Token Condition"); String tokenValue = context.getEnvironment().getProperty("okta.client.token"); if (StringUtils.hasText(tokenValue)) { return ConditionOutcome.match(message.foundExactly("provided API token")); } return ConditionOutcome.noMatch(message.didNotFind("provided API token").atAll()); } }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage.forCondition("JmmsDataSource"); if (anyMatches(context, metadata, this.anyPropertyCondition)) { return ConditionOutcome.noMatch(message.foundExactly("supported data source")); }else { return ConditionOutcome.match(message.foundExactly("jmms data source")); } } }
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { ConditionMessage.Builder message = ConditionMessage.forCondition("Okta Api Token Condition"); String tokenValue = context.getEnvironment().getProperty("okta.client.token"); if (StringUtils.hasText(tokenValue)) { return ConditionOutcome.match(message.foundExactly("provided API token")); } return ConditionOutcome.noMatch(message.didNotFind("provided API token").atAll()); } }