Skip to content

Commit 641e386

Browse files
author
Alexander Furer
committed
Merge remote-tracking branch 'origin/master'
2 parents 4e98a9b + 87c49e3 commit 641e386

File tree

1 file changed

+2
-2
lines changed
  • grpc-client-spring-boot-starter/src/main/java/org/lognet/springboot/grpc/security

1 file changed

+2
-2
lines changed

grpc-client-spring-boot-starter/src/main/java/org/lognet/springboot/grpc/security/AuthHeader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public AuthHeader.AuthHeaderBuilder basic(String userName, byte[] password) {
3838

3939
}
4040
public Metadata attach(Metadata metadataHeader){
41-
byte[] token = tokenSupplier.get().array();
42-
final byte[] header = ByteBuffer.allocate(authScheme.length() + token.length + 1)
41+
ByteBuffer token = tokenSupplier.get();
42+
final byte[] header = ByteBuffer.allocate(authScheme.length() + token.remaining() + 1)
4343
.put(authScheme.getBytes())
4444
.put((byte) ' ')
4545
.put(token)

0 commit comments

Comments
 (0)